vmi / selenese-runner-java

Selenium IDE native format (selenese and side) interpreter.
Other
140 stars 82 forks source link

WebdriverElementFinder.findElementsByLocator() causes endless loop #311

Closed shenlian8 closed 3 years ago

shenlian8 commented 4 years ago

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

shenlian8 commented 4 years ago

Issue report on chrome driver

https://bugs.chromium.org/p/chromedriver/issues/detail?id=3232&q=&colspec=ID%20Status%20Pri%20Owner%20Summary

Issue report on selenium

https://github.com/SeleniumHQ/selenium/issues/5401

vmi commented 4 years ago

Hi,

I have added a nested frame depth limit (max depth is 16) because Selenium does not provide getting frame information. I released 3.29.0. Please test it.

vmi commented 3 years ago

Please re-open this issue if there is anything that Selenese Runner Java can do about it.