page.wait_for
Waits until an element, text, or condition appears or disappears; use any_of or all_of to race several outcomes. On timeout, it reports which conditions were unmet and the closest page content.
Instructions
Wait until an element appears or disappears, or until text shows up. Use any_of to race several outcomes (success UI vs error UI) instead of guessing one and eating a full timeout; all_of waits for every condition. On timeout the error reports which conditions were unmet and the closest thing on the page.
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": "page.wait_for"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gone | No | Wait for absence instead of presence. | |
| text | No | ||
| all_of | No | Return once every one of these is met. | |
| any_of | No | Return as soon as any one of these is met; the response says which (matched, index). | |
| poll_ms | No | ||
| selector | No | ||
| normalize | No | Case- and whitespace-insensitive text matching. Use when the DOM may differ in casing or line breaks. | |
| target_id | No | Target handle (tgt_*). Omit for the active page. | |
| browser_id | No | Browser handle (br_*). Omit to use the only running browser, or auto-launch one. | |
| timeout_ms | No |