Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Last active February 13, 2016 16:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angelovstanton/ea236159ae18b7012752 to your computer and use it in GitHub Desktop.
Save angelovstanton/ea236159ae18b7012752 to your computer and use it in GitHub Desktop.
private void WaitUntilLoaded()
{
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(30));
wait.Until((x) =>
{
return ((IJavaScriptExecutor)this.driver)
.ExecuteScript("return document.readyState").Equals("complete");
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment