Here is the entirety of my test class in Java, minus imports.
public class GoogleTest {
private WebDriver driver;
@Before
public void setUp() {
driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
}
@Test
public void testGoogleTest() throws Exception {
driver.get("http://www.google.com");
driver.findElement(By.id("I don't exist"));
}
@After
public void tearDown() throws Exception {
driver.quit();
}
}
From my understanding, the implicitlyWait command should make the test error out with “ElementNotFound” after 5 seconds. This doesn’t happen. It does open an FF window, goes to google and then sits there forever. If I close the browser window, it will throw an UnreachableBrowser exception (as I would expect).
I’ve tried playing around with different time units, but it made no difference.
I’m using Selenium 2.25.
It seems to be a bug with Selenium
2.25and Selenium2.26, so try updating to2.27