wait_for
Pauses automation until a CSS selector appears, a network request matching a URL pattern fires, or navigation completes, with request mode confirming the request actually triggered.
Instructions
Wait for an element, a captured network request, or a navigation.
Args:
selector: CSS selector to wait for.
url_pattern: URL substring (or shell-style glob when it contains
*) used by request/navigation modes.
timeout: Max wait in milliseconds.
mode: Which condition url_pattern means.
"auto" (default) matches a captured request when network capture is
already running, otherwise falls back to navigation.
"request" only matches captured requests and reports a clear hint
when nothing arrives, so "the request never fired" is not confused
with "the page did not navigate".
"navigation" keeps the previous behaviour (page.wait_for_url).
after_id: Optional request id; only requests with a larger id match, so
an already-captured request cannot satisfy a later wait.
poll_interval_ms: Polling interval for request mode.
Returns:
dict with status plus mode; request mode also returns the
matched request summary (id/url/method/status/ms).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "wait_for"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | auto | |
| timeout | No | ||
| after_id | No | ||
| selector | No | ||
| url_pattern | No | ||
| poll_interval_ms | No |