How-to
Wait for URL (waitForURL)
Wait for URL (waitForURL)
Waits until the tab URL matches Value. The worker passes Value to Playwright as a string: that is a glob (**/web/ru), not a /pattern/flags record. A /…/ string is not compiled to a regular expression. No Target. Source must be INLINE only.
Step model
action_name | waitForURL |
| Group | Wait |
| Target | Unused |
| Value | Required (url) |
| expected_value | Unused |
| TEST_ACCOUNT | Forbidden |
| Do not confuse with | toHaveURL, goto |
Target/Value facts match the source-of-truth catalog and Autotest step.
Prerequisites
- Previous steps trigger navigation.
Steps
- Add a
waitForURLstep. - Leave Target empty.
- Put a Playwright glob (
**/web/ru) or an exact URL in Value. Write the pattern as the address appears in the browser: a trailing slash (**/web/ru/when the href has none) will not match. - Source must be
INLINE. - Save.
The step is stored on the autotest. Next - neighbouring steps or autotest run creation.
Examples
After sign-in
Fields in the UI:
| Field | Value |
|---|---|
action_name | waitForURL |
| Target | empty |
| Value | **/projects** |
| value_source_type | INLINE |
| timeout_ms | 20000 |
Step JSON fragment (copy-paste):
json
{
"action_name": "waitForURL",
"value_text": "**/projects**",
"value_source_type": "INLINE",
"timeout_ms": 20000
}Common mistakes
toHaveURLis an assertion;waitForURLwaits before later steps.- Do not use TEST_ACCOUNT.
- Do not put
/pattern/flagsin Value: forwaitForURLthat is a glob. Use a regular expression on toHaveURL. - Breakdown: How to author autotest steps without false failures.
Screenshots
Screenshots of the step form for waitForURL will be added here in a later pass.
Did this page help?