File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 3434abstract class Container extends AbstractWebDriver
3535{
3636 const LEGACY_ELEMENT_ID = 'ELEMENT ' ;
37- const WEBDRIVER_ELEMENT_ID = 'element-6066-11e4-a52e-4f735466cecf ' ;
37+ const WEB_ELEMENT_ID = 'element-6066-11e4-a52e-4f735466cecf ' ;
3838
3939 /**
4040 * @var array
@@ -213,17 +213,21 @@ public function locate($using, $value)
213213 protected function webDriverElement ($ value )
214214 {
215215 if (array_key_exists (self ::LEGACY_ELEMENT_ID , (array ) $ value )) {
216+ assert ($ this ->legacy === false );
217+
216218 return new Element (
217219 $ this ->getElementPath ($ value [self ::LEGACY_ELEMENT_ID ]), // url
218220 $ value [self ::LEGACY_ELEMENT_ID ], // id
219221 $ this ->legacy
220222 );
221223 }
222224
223- if (array_key_exists (self ::WEBDRIVER_ELEMENT_ID , (array ) $ value )) {
225+ if (array_key_exists (self ::WEB_ELEMENT_ID , (array ) $ value )) {
226+ assert ($ this ->legacy === true );
227+
224228 return new Element (
225- $ this ->getElementPath ($ value [self ::WEBDRIVER_ELEMENT_ID ]), // url
226- $ value [self ::WEBDRIVER_ELEMENT_ID ], // id
229+ $ this ->getElementPath ($ value [self ::WEB_ELEMENT_ID ]), // url
230+ $ value [self ::WEB_ELEMENT_ID ], // id
227231 $ this ->legacy
228232 );
229233 }
Original file line number Diff line number Diff line change 3131 */
3232final class Frame extends AbstractWebDriver
3333{
34- const WEBDRIVER_FRAME_ID = 'frame-075b-4da1-b6ba-e579c2d3230a ' ;
34+ const WEB_FRAME_ID = 'frame-075b-4da1-b6ba-e579c2d3230a ' ;
3535
3636 /**
3737 * {@inheritdoc}
Original file line number Diff line number Diff line change 4141 */
4242final class Window extends AbstractWebDriver
4343{
44- const WEBDRIVER_WINDOW_ID = 'window-fcc6-11e5-b4f8-330a88ab9d7f ' ;
44+ const WEB_WINDOW_ID = 'window-fcc6-11e5-b4f8-330a88ab9d7f ' ;
4545
4646 /**
4747 * {@inheritdoc}
@@ -70,8 +70,8 @@ public function getHandle()
7070 {
7171 $ result = $ this ->curl ('GET ' , $ this ->url );
7272
73- return array_key_exists (self ::WEBDRIVER_WINDOW_ID , $ result ['value ' ])
74- ? $ result ['value ' ][self ::WEBDRIVER_WINDOW_ID ]
73+ return array_key_exists (self ::WEB_WINDOW_ID , $ result ['value ' ])
74+ ? $ result ['value ' ][self ::WEB_WINDOW_ID ]
7575 : $ result ['value ' ];
7676 }
7777
You can’t perform that action at this time.
0 commit comments