wait
Poll until an element, text, or URL condition is met
Wait steps poll until a condition succeeds (or the timeout fails the step).
Forms
| Form | Meaning |
|---|---|
wait for "<label>" | Until a labeled element is visible |
wait for see "<text>" | Until text appears |
wait until not see "<text>" | Until text disappears |
wait until be on "<fragment>" | Until URL contains fragment |
wait for url contains "<fragment>" | Until URL contains fragment |
wait for network idle | Until Playwright networkidle load state |
wait for response "<fragment>" | Until a browser response URL contains the fragment (UI XHR) |
Examples
And I wait for "dashboard"
And I wait for see "Saved successfully"
And I wait until not see "Loading..."
And I wait until be on "/dashboard"
And I wait for url contains "checkout"
And I wait for network idle
And I wait for response "/api/orders"Qualifiers
| Qualifier | Role |
|---|---|
for | Wait until labeled element is visible |
for see | Wait until text appears |
until not see | Wait until text is gone |
until be on | Wait until URL contains fragment |
for url contains | Wait until URL contains fragment |
for network idle | Wait until network is idle (no value) |
for response | Wait until a browser response URL contains the fragment |
Requirements
| Item | Contract |
|---|---|
| Element / control shape | wait for — general resolve, then poll until visible. for see / until not see — page (or iframe-scoped) text, any element. URL / network / response waits — no element |
| How the label binds | Optional by … on wait for element labels |
| Qualifiers that change resolve | See Forms table above |
| Platform | Web UI waits; not Platform: api (use api wait for HTTP poll) |
| Wrong shape → use instead | Waiting for URL → until be on / for url contains, not wait for |
When it fails
- Element wait timeout — label missed or control never becomes visible (often wrong shape).
- Text wait timeout — text never appears/disappears in scope.
See also UI contracts.
Notes
wait for responseis a UI XHR wait (browser), notPlatform: api. For HTTP API polling see api wait.- Page-level waits (
for network idle,for response) do not use action-resolve auto-wait.