FluentWait
FluentWait is one of the implementation of the Selenium's Wait interface through which user can confugre custom/tailor-made timeouts and polling intervals runtime.
Through FluentWait instance users can define the maximum amount of time to wait for a condition through a custom frequency to check the condition. The user can also configure the wait instance to ignore specific exceptions while waiting such as NoSuchElementExceptions when searching for an element on the page.
Sample Usage
// Waiting 30 seconds for an element to be present on the page, checking
// for its presence once every 5 seconds.
Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)
.withTimeout(Duration.ofSeconds(100))
.pollingEvery(Duration.ofMillis(600))
.ignoring(NoSuchElementException.class);
WebElement foo = wait.until(new Function<WebDriver, WebElement>() {
public WebElement apply(WebDriver driver) {
return driver.findElement(By.name("q"));
}
});