File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change 32
32
*/
33
33
abstract class Container extends AbstractWebDriver
34
34
{
35
+ const LEGACY_ELEMENT_ID = 'ELEMENT ' ;
36
+ const WEBDRIVER_ELEMENT_ID = 'element-6066-11e4-a52e-4f735466cecf ' ;
37
+
35
38
/**
36
39
* {@inheritdoc}
37
40
*/
@@ -203,12 +206,19 @@ public function locate($using, $value)
203
206
*/
204
207
protected function webDriverElement ($ value )
205
208
{
206
- return array_key_exists ('ELEMENT ' , (array ) $ value )
207
- ? new Element (
208
- $ this ->getElementPath ($ value ['ELEMENT ' ]), // url
209
- $ value ['ELEMENT ' ] // id
210
- )
211
- : null ;
209
+ if (array_key_exists (self ::LEGACY_ELEMENT_ID , (array ) $ value )) {
210
+ return new Element (
211
+ $ this ->getElementPath ($ value [self ::LEGACY_ELEMENT_ID ]), // url
212
+ $ value [self ::LEGACY_ELEMENT_ID ] // id
213
+ );
214
+ }
215
+
216
+ if (array_key_exists (self ::WEBDRIVER_ELEMENT_ID , (array ) $ value )) {
217
+ return new Element (
218
+ $ this ->getElementPath ($ value [self ::WEBDRIVER_ELEMENT_ID ]), // url
219
+ $ value [self ::WEBDRIVER_ELEMENT_ID ] // id
220
+ );
221
+ }
212
222
}
213
223
214
224
/**
You can’t perform that action at this time.
0 commit comments