lecture 12 of 190 completed

Content that appears, changes and disappears

Lists that load late, rows that update, messages that vanish. The three patterns behind most 'element not found' failures.

What you'll learn

  • Why content that loads late breaks a naive test
  • How to keep an assertion retrying instead of reading a value once
  • Why a permanent result is worth more than a temporary message

The contacts page shows a spinner, then the table appears. Your test opens the page and immediately counts the rows. It finds zero and fails.

Nothing is wrong with the app. Your test arrived during the spinner. This lecture is about the three shapes this takes and what to do about each.

Content that arrives late.

The page loads, then data is fetched, then the list renders. The mistake is checking for a count too early:

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 →