Skip to content

Instantly share code, notes, and snippets.

@jsdevel
Last active August 29, 2015 14:01
Show Gist options
  • Save jsdevel/99a5d736fbdd6c86d455 to your computer and use it in GitHub Desktop.
Save jsdevel/99a5d736fbdd6c86d455 to your computer and use it in GitHub Desktop.
WebDriverWait example with webdriver-sync
var byLocator = By.cssSelector('.some.selector');
var timeout = 5;//seconds
var element = (new WebDriverWait(driver, timeout))
.until(ExpectedConditions.visibilityOfElementLocated(byLocator));
console.log(element.getText());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment