Firefox WebDriver hangs waiting for page to load
sometimes in my test done with Selenium 2.41 and tested with Firefox 28 the execution hangs waiting for page to load. This is the wait condition: int time = 30; WebDriverWait wait = new WebDriverWait(webDriver, time); ExpectedCondition<Boolean> pageLoadCondition = new ExpectedCondition<Boolean>() { public Boolean apply(WebDriver driver) { return ((JavascriptExecutor)driver).executeScript("return document.readyState").equals("complete"); } }; wait.until(pageLoadCondition); It's supposed that after 30 seconds this method will throw a TimeoutException, but it's not, sometimes hangs forever. This