File tree 3 files changed +13
-1
lines changed
3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,11 @@ public function toW3cCompatibleArray()
229
229
if (array_key_exists ($ capabilityKey , static ::$ ossToW3c )) {
230
230
if ($ capabilityKey === WebDriverCapabilityType::PLATFORM ) {
231
231
$ w3cCapabilities [static ::$ ossToW3c [$ capabilityKey ]] = mb_strtolower ($ capabilityValue );
232
+
233
+ // Remove platformName if it is set to "any"
234
+ if ($ w3cCapabilities [static ::$ ossToW3c [$ capabilityKey ]] === 'any ' ) {
235
+ unset($ w3cCapabilities [static ::$ ossToW3c [$ capabilityKey ]]);
236
+ }
232
237
} else {
233
238
$ w3cCapabilities [static ::$ ossToW3c [$ capabilityKey ]] = $ capabilityValue ;
234
239
}
Original file line number Diff line number Diff line change 23
23
class WebDriverPlatform
24
24
{
25
25
const ANDROID = 'ANDROID ' ;
26
+ /** @deprecated */
26
27
const ANY = 'ANY ' ;
27
28
const LINUX = 'LINUX ' ;
28
29
const MAC = 'MAC ' ;
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ public function provideW3cCapabilities()
187
187
]),
188
188
[],
189
189
],
190
- 'already W3C capabilitites ' => [
190
+ 'already W3C capabilities ' => [
191
191
new DesiredCapabilities ([
192
192
'pageLoadStrategy ' => 'eager ' ,
193
193
'strictFileInteractability ' => false ,
@@ -197,6 +197,12 @@ public function provideW3cCapabilities()
197
197
'strictFileInteractability ' => false ,
198
198
],
199
199
],
200
+ '"ANY" platform should be completely removed ' => [
201
+ new DesiredCapabilities ([
202
+ WebDriverCapabilityType::PLATFORM => WebDriverPlatform::ANY ,
203
+ ]),
204
+ [],
205
+ ],
200
206
'custom vendor extension ' => [
201
207
new DesiredCapabilities ([
202
208
'vendor:prefix ' => 'vendor extension should be kept ' ,
You can’t perform that action at this time.
0 commit comments