lecture 6 of 160 completed

Building the wait library your suite depends on

Ninety engineers writing waits individually produces ninety subtly different bugs. Encode correctness once.

What you'll learn

  • Which four wait mistakes engineers repeat
  • How to make the correct wait the easiest to write
  • How to enforce it so it does not decay

In a suite with no wait library, every engineer writes waits from memory. Some wait for presence when they meant visibility. Some read the element before waiting. Some hard-code timeouts. Every one of those is a flaky test waiting for a slow day.

The fix is not training. It is making the correct thing the easiest thing to write.

Start from what people actually get wrong.

Presence instead of visibility. elementLocated returns as soon as the element is in the DOM, which can be before it is visible or interactive. Then the click fails.

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 →