Hi,
I try to find a legal but not exists xpath eg. //foo under a chrome driver.
In WebdriverElementFinder.pushFrame
driver.switchTo().frame(0) is called. In some cases (but I do not know which case) chrome driver do not switch the frame. It stays in the main html. This should be the bug of chrome driver. In this case, the WebdriverElementFinder.findElementsByLocator() function will go into an endless loop.
Would you add one check in pushFrame() function that checks if the frame is really be switched. If it is not switched, then the findElementsByLocator() should return null to prevent the endless loop.
This is not a bug from your side. It is caused by chrome driver.
Thanks!
Lian Shen