public void waitTillDocumentStateReady()
{
LocalDateTime now = LocalDateTime.now();
while (LocalDateTime.now().isBefore(now.plusSeconds(20))) {
while (!((JavascriptExecutor) driver.getDriver()).executeScript("return document.readyState").equals("complete")) {
driver.sleep(1);
}
}
}
No comments:
Post a Comment