lecture 1 of 160 completed

Waits, and the mistake that hides in them

Explicit waits are the right tool. Mixing them with implicit waits creates timing bugs that are very hard to find.

What you'll learn

  • Why explicit waits are the right tool
  • What goes wrong when implicit and explicit waits are mixed
  • How to remove an inherited implicit wait safely

You already know not to use driver.sleep. Now let's talk about the mistake that replaces it, because it appears in almost every Selenium project.

Selenium has two kinds of waiting, and they do not work well together.

An implicit wait is a global setting. You set it once, and every findElement will keep retrying for that long before giving up:

members only

Keep reading with the full course

The Foundations track and the first 5 lectures of each framework are free. This lecture is part of the paid course, which unlocks every lecture, all three frameworks, and downloads.

See the options →