Created
January 3, 2012 16:16
-
-
Save jcarlosgarcia/1555569 to your computer and use it in GitHub Desktop.
Waiting for an element to be loaded with Selenium/WebDriver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(new WebDriverWait(driver, TIMEOUT)).until(new ExpectedCondition<Boolean>() { | |
public Boolean apply(WebDriver d) { | |
return driver.findElement(By.xpath("myXPathExpression")).isDisplayed(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment