A Mobile Application Testing Community
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
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.
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.
WebDriverWait wait = new WebDriverWait(drv,30);