Auto retrying matchers with a within N seconds budget. The shortest path from flaky to green.
Step phrasings in this group
The book sidebar lists each individual step page under this group.
Then "#dashboard" should be visibleAuto-retrying state assertion. Polls the live page until the matcher passes
Then "#loading-spinner" should not be visibleAuto-retrying negated state assertion.
Then "#hero" should be in the viewportAssert an element's bounding box overlaps the visible viewport rectangle.
Then "#footer" should not be in the viewportAssert an element is OUTSIDE the visible viewport rectangle.
Then ".product-card" should have a count of 12Assert exactly N elements match a selector (auto-retry).
Then "h1" should have text "Welcome"Assert an element's textContent equals an expected string (trimmed).
Then "h1" should contain text "Welcome"Assert an element's textContent contains an expected substring.
Then "#email" should have value "alice@example.com"Assert an input's value property equals an expected string.
Then "#tab-1" should have attribute "aria-selected" with value "true"Assert an element's attribute equals an expected value.
Then "#tab-1" should have class "is-active"Assert an element's class attribute contains a class token.
When I click the "Sign in" buttonClick an element by its accessible role + name (Playwright getByRole).
Then the "Save changes" button should be visibleAssert a role-addressed element is visible (auto-retry).