Selenium Webdriver Execution Gets Stuck Due To A Javascript Wait Condition
I have been using a java-script wait condition to wait for page load and my code is like this: public void untilPageIsLoaded() { ExpectedCondition condition
Solution 1:
This code would never execute until the document is already ready anyway.
So there is no need to execute this JS from selenium - because it can only ever return one result - "complete."
This is because you can't execute JS from SE until you are on a page. The only way to get on a page is to call Selenium's .get()
, which blocks any following execution until the DOM is fully loaded. So .get()
is already doing what your .untilPageIsLoaded()
would otherwise do.
Post a Comment for "Selenium Webdriver Execution Gets Stuck Due To A Javascript Wait Condition"