From the course: Python Automation and Testing

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

From the course: Python Automation and Testing

Start my 1-month free trial

Implicit waits

- [Instructor] An implicit wait is one where you want your code to pause for a certain amount of time before every action or every element to be loaded. The typical use case for implicit waits is when you have a slow internet connection and you know that every element in the site will load much slowly than expected. So you add an implicit wait before every call, so once the element is loaded. If the element is loaded within the specified time, then the script moves on. If the element is not loaded within the specified amount of time, then an exception is thrown. The main difference between implicit and explicit waits is that explicit wait, waits for a certain condition only. Implicit wait waits before every call that is made from your script. The waiting time in the case of implicit wait is specified in seconds. Let's look at a small code example to see how implicit waits can be used. And we have a new file here. So I'm going to first import the WebDriver, (keyboard clicking) and I…

Contents