Mobile QA Zone

A Mobile Application Testing Community

What are the different types of waits available in WebDriver?

Views: 59

Reply to This

Replies to This Discussion

Wait play an important part in web/mobile automation testing. Any automation testing company has their standard frameworks in multiple languages. Below are the details of the waits used in Selenium webdriver:

WebDriver provides two types of waits to handle the loading of web pages, windows appearance, error messages,pop ups and the visibility of web elements on the web page. Below are the tow type of waits provided by WebDriver:

1. Implicit Wait
2. Explicit Wait

Implicit Wait:
Default waiting time (say 30 seconds) is provided by Implicit Waits between the test step/command in the test script. Subsequent test step would wait for the default waiting time after executing the previous test step/command.

drv.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

Explicit Wait:
Explicit waits helps in waiting till the time a particular condition is met or the maximum time has elapsed.

Classes like WebDriverWait and ExpectedConditions are intorduced by the webdriver to enforce Explicit waits into the test scripts.

WebDriver drv;
WebDriverWait wait = new WebDriverWait(drv,30);


© 2019   Created by Anurag Khode.   Powered by

Badges  |  Report an Issue  |  Terms of Service

Welcome to Mobile QA Zone, a Next Generation Software Testing Community.Invite your friends to join this community.Write to us to become a featured member.