lecture 11 of 200 completed

Waiting properly

A fixed pause is a guess. Too short and the test fails; too long and every run wastes time.

What you'll learn

  • Why a fixed pause is a guess that fails in both directions
  • How to wait for a condition instead of a length of time
  • Where timing bugs come from, and how to stop causing them

Saving a contact takes about 700 milliseconds. So the obvious thing to write is this:

full course

Keep reading with the full course

The Foundations track and the first lessons in each framework are free. This lesson needs full course access. A course plan includes all lessons for Playwright, Cypress and Selenium.

See course plans →