Different Wait Methods in Selenium WebDriver

Following are the different types of wait methods available in Selenium WebDriver:

Implicit Wait:

WebDriver waits for a certain duration of time until all the elements on the page are loaded. This can be useful when certain elements on the webpage are not available immediately and need some time to load.


Explicit Wait:

WebDriver will wait for a specific element on the page until the given condition is satisfied. This can be useful if one of the element take longer time to load compared to other elements on the page.

driver.findElement(By.xpath("//a[text()=' Sign Up Here']")).click();
WebDriverWait wait = new WebDriverWait(driver,30);

Fluent Wait:

It tells the webdriver to wait for a condition, as well as the frequency with which to check the condition.

Wait<WebDriver> wait1 = new FluentWait<>(driver)

WebElement element = wait1.until(new Function<WebDriver, WebElement>() {
public WebElement apply(WebDriver driver) {
return driver.findElement(By.id("firstName"));

PageLoad Timeout:

Sets the amount of time to wait for a page-load to complete before throwing an error.


SetScript Timeout:

Sets the amount of time to wait for an asynchronous script to finish execution before throwing an error.




Bijan Patel

Founder & Creator of QAScript | 12+ years of IT Experience | Full Stack Automation Engineer | Blogger | Trainer

You may also like...

Leave a Reply

Your email address will not be published.