TOPIC 10/6018 MINNOT STARTED

Auto-waiting: what Playwright checks before it acts

Before it clicks or types, Playwright waits until the element is ready, so most hand-written waits are not needed. Learn what it checks and what it cannot.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: a waiter who checks the table before seating you. The waiter looks for the table, checks that it is clear, and checks that nobody is still sitting there. Only then do you sit. Sitting at once lands you on a stranger.

Daily List is a to-do list app. The Add task button slides in with a panel. For a moment the button is moving. Then a spinner covers it. A click in that moment hits the wrong spot.

What it is: Playwright is a library that drives a real browser. This slice is auto-waiting: the actionability checks Playwright repeats before it clicks or types. asks whether the element is ready for that action. The nearest neighbour is a fixed pause, such as waiting three seconds and hoping. Selenium teams often write those waits by hand. some commands too, and the checks are not identical.

Why it matters: A click on a moving or covered button fails on a slow day and passes on a fast one. Tom stops trusting the suite. Actionability checks wait for a real ready state, so a pass means the click landed.

The waiter sees the whole room. Playwright asks about the one element. It cannot know that the task list is still empty. Later lessons cover checks that keep trying for that.

(SYNTHETIC / TRAINING ONLY: Daily List and every person named here are made up.)

PLAIN WORDS · 5 in this section
playwright
a free Microsoft tool that drives a browser for tests
actionability
whether an element is ready for action, such as visible
selenium
A free tool that drives a web browser for checks.
cypress
A free tool that drives a web browser for checks.
retries
tries again after a failure, or those further attempts

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB Letting a tool wait until an element is ready before it acts on it.

  1. Visible
  2. Stable
  3. Enabled
  4. Not covered
Look before you seat

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
The waiter looking at the tableThe tool asking questions about the element
The table being there and cleanVisible and enabled
Nobody still sitting down or moving chairsStable
A stranger standing in front of the seatA hit target that is not the element

WHERE THIS PICTURE STOPS

  • A waiter sees the whole room. Playwright asks only about one element.
  • A waiter can see a full kitchen. Playwright cannot see that data is on its way.
  • A waiter waits as long as needed. Playwright stops at a time limit and fails.

HOOK

Look before you seat.

REMEMBER IT THIS WAY

A sequence: the real steps, in order.

Before it clicks, the tool asks four short questions: here, ready, still, clear.

What each part of the trick stands for
In the trickWhat it stands for
Here?visible
Ready?enabled
Still?stable, not moving
Clear?nothing covers the element at the click point

TELL A FRIEND

A waiter who checks the table is free and not covered before sitting you down.

OFTEN MIXED UP WITH Waits and timing in automated checks. The earlier lesson says what a wait is and compares three kinds. This lesson lists the exact checks Playwright makes for you.

Sources & standards — 3 sources
  1. Market practice

    Auto-waiting (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Says Playwright runs actionability checks (visible, stable, enabled, receives events) before an action and fails with a timeout error if they do not pass in time. Vendor documentation. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  2. Market practice

    Best practices (Playwright documentation) ↗ — Microsoft (Playwright) · Avoid fixed waits; use web-first assertions that retry (search excerpt, page not opened)

    Recommends user-facing locators such as role-based ones over Cascading Style Sheets (CSS) or XPath, web-first assertions that retry, and avoiding fixed waits. Vendor documentation. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail. A second search on 2026-10-20 returned this page for its title and matched the described content; the page was still not opened (search excerpt, page not opened).

  3. Market practice

    Timeouts (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Describes the test timeout (30 seconds by default at the time of writing, covering the test body, fixtures and beforeEach hooks), the expect timeout (5 seconds by default at the time of writing), the action and navigation timeouts set under use in the config (no limit by default), test.setTimeout, test.slow (triple the test timeout), the separate timeout of beforeAll and afterAll hooks and the global timeout. Says the expect timeout can be overridden per assertion. Default values change between releases, so lessons say 'at the time of writing' or leave them out. Vendor documentation for one tool. Practitioner guidance, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

PRACTISE AND KEEP

Sources for this topic — 3 sources
  1. Market practice

    Auto-waiting (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Says Playwright runs actionability checks (visible, stable, enabled, receives events) before an action and fails with a timeout error if they do not pass in time. Vendor documentation. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  2. Market practice

    Best practices (Playwright documentation) ↗ — Microsoft (Playwright) · Avoid fixed waits; use web-first assertions that retry (search excerpt, page not opened)

    Recommends user-facing locators such as role-based ones over Cascading Style Sheets (CSS) or XPath, web-first assertions that retry, and avoiding fixed waits. Vendor documentation. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail. A second search on 2026-10-20 returned this page for its title and matched the described content; the page was still not opened (search excerpt, page not opened).

  3. Market practice

    Timeouts (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Describes the test timeout (30 seconds by default at the time of writing, covering the test body, fixtures and beforeEach hooks), the expect timeout (5 seconds by default at the time of writing), the action and navigation timeouts set under use in the config (no limit by default), test.setTimeout, test.slow (triple the test timeout), the separate timeout of beforeAll and afterAll hooks and the global timeout. Says the expect timeout can be overridden per assertion. Default values change between releases, so lessons say 'at the time of writing' or leave them out. Vendor documentation for one tool. Practitioner guidance, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.