Monday, October 21, 2019

What is the difference between Implicit Wait and Explicit Wait in Selenium Automation?

This is one of the frequently asked question in interviews. The answer is very simple, in Selenium automation the waits are categorized into types Implicit Wait and Explicit Wait.

Implicit Wait: This wait applicable to all the web elements on the web application through the project once defined. If we define this wait as "15" seconds at driver instantiation level, then driver will wait for 15 seconds for any web element on the web pages.

Explicit Wait: This wait is applicable to one web element at a time based on a ondition. Suppose there are two web elements say "button" and "link", button is loading after 20 seconds and link is loading after 30 seconds. So we can define Explicit wait for 20 and 30 seconds using WebDriverWait and we can make the WebDriver to wait for these two elements individually.

No comments:

Post a Comment

How do you identify broken links in Selenium Automation?

When we are asked to identify the broken links in the application, what we do? Collecting all the links on the page to a list and looping t...