Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

i need example to fluent wait with package import

Solved 1 Answers 196 Views Test Automation
0 1
I have got plunty of examples to implement fluent wait, but I have not seen example with what are the package to be imported. Kindly post list of packages to be imported with fluent wait

1 Answer

Best answer

Packages to be imported:

import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.StaleElementReferenceException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
Wait sample:
Wait<WebDriver> wait
= new FluentWait<WebDriver>(driver)
.withTimeout(60, TimeUnit.SECONDS)
.pollingEvery(5, TimeUnit.SECONDS)
WebElement eleVendorId =
wait.until(new Function<WebDriver, WebElement>() {
public WebElement apply(WebDriver driver) {
return driver.findElement(byvendor_id);
answered by
selected by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.