File tree Expand file tree Collapse file tree 1 file changed +1
-23
lines changed
Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -300,14 +300,8 @@ protected function createMinkElementFromWebDriverElement(Element $element)
300300 if (count ($ minkElements ) > 1 ) {
301301 throw new DriverException (sprintf ('XPath "%s" built from WebDriver element find more than one element ' , $ xpath ));
302302 }
303- $ minkElement = reset ($ minkElements );
304303
305- // DEBUG only
306- if ($ this ->findElement ($ minkElement ->getXpath ())->getID () !== $ element ->getId ()) {
307- throw new \Error (sprintf ('XPath "%s" built from WebDriver element cannot find the same element ' , $ xpath ));
308- }
309-
310- return $ minkElement ;
304+ return reset ($ minkElements );
311305 }
312306
313307 /**
@@ -627,22 +621,6 @@ public function findElementXpaths($xpath)
627621 $ elements [] = sprintf ('(%s)[%d] ' , $ xpath , $ i +1 );
628622 }
629623
630- // DEBUG only
631- $ recursiveCount = 0 ;
632- foreach (debug_backtrace () as $ trace ) {
633- if (($ trace ['function ' ] ?? null ) === __FUNCTION__ ) {
634- $ recursive = $ recursiveCount ++;
635- }
636- }
637- if ($ recursiveCount <= 4 ) {
638- foreach ($ nodes as $ element ) {
639- $ minkElement = $ this ->createMinkElementFromWebDriverElement ($ element );
640- if ($ this ->findElement ($ minkElement ->getXpath ())->getID () !== $ element ->getId ()) {
641- throw new \Error (sprintf ('XPath "%s" built from WebDriver element cannot find the same element (in find) ' , $ xpath ));
642- }
643- }
644- }
645-
646624 return $ elements ;
647625 }
648626
You can’t perform that action at this time.
0 commit comments