From the course: Selenium Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Implicit waits

Implicit waits - Selenium Tutorial

From the course: Selenium Essential Training

Start my 1-month free trial

Implicit waits

- [Narrator] The implicit wait tells WebDriver to wait for a specified amount of time before throwing a no such element exception. Because the default setting of waiting for an element is zero, an implicit wait will be set for a time greater than zero to expect the element to become available. Implicit waits are called implicit because they don't depend on a certain element state. Instead, they just wait for a specified time. The format to declare an implicit wait is driver.manage.timeouts.implicitlywait. And the implicitly wait method takes two parameters. The first is the time to wait as an integer, and the second is the time measurement, for example microseconds, milliseconds, or seconds. Let's do a quick example of using an implicit wait now. I'll open up the exercise file for this video by navigating to chapter five, zero five zero two, start, and I'll open up this example. Once this project is open, I'll go ahead and build the project. And now I'll focus on the test class. So…

Contents