Created
December 21, 2016 17:47
-
-
Save jineshqa/3f32fcd95ca51c37c3938569be4cb884 to your computer and use it in GitHub Desktop.
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
//Define fluent wait | |
FluentWait wait = new FluentWait(driver) | |
.withTimeout(15, TimeUnit.SECONDS) | |
.pollingEvery(1,TimeUnit.SECONDS) | |
.ignoring(NoSuchElementException.class); | |
wait.until(new ExpectedCondition<Boolean>() { | |
@Override | |
public Boolean apply(WebDriver d) { | |
Long loadingStripCount = (Long)((JavascriptExecutor) driver).executeScript("return $('.k-loading-image').length;"); | |
return loadingStripCount < 1 ; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment