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 |
Optional by … find hints may apply where the target is an element label (for example wait for).
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.