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 categorised 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 condition. 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 seconds and 30 seconds using WebDriverWait respectively. And now, WebDriver waits for maximum  20 seconds for "button" and 30 seconds for "link" separately. If the given condition is met within the maximum time, WebDriver moves to the next step, it will not for maximum time period.

Hope the above post gave you basic understanding of differences between Implicit and Explicit waits in Selenium WebDriver. 

Thank you for reading. Keep learning and sharing. #qababu 

1 comment:

  1. Hi there to everybody, it’s my first go to see of this web site; this weblog consists of awesome and in fact good stuff for visitors. Hurrah, that’s what I was exploring for, what stuff! Existing here at this blog, thanks admin of this web site. You can also visit Custom Web Application Development for more Metricoid Technology Solutions related information and knowledge.


DevOps 01: What is DevOps and How it benefits organizations?

DevOps is a culture in an organization, where the development team and operations team help each other by sharing information, process and t...