Question

I'm using Selenium 2 in Java, and when loading a web page using Webdriver's (the InternetExplorerDriver class) get() method a time-out is received and the execution halts although the page appears as completely loaded to me.
I've tried using the WebDriverWait class but I can't figure out what function to provide as the condition to the until() method .
Update: implemented the Condition class, but now can't figure out whether the wait.until() method should be used before or after the get()...

Was it helpful?

Solution

Probably your page have some AJAX so WebDriver thinks that it is loaded, while it is not yet. You should utilize Page Objects pattern and AjaxElementLocatorFactory - its more reliable then just using wait. Also this pattern allows creation of maintainable tests and have many advantages

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top