wait_for
Waits until specified conditions are met—visible text appears/disappears, an element reaches a state, or the URL contains text—checking every 100 ms and returning elapsed time or timeout details.
Instructions
Waits until every condition given holds: visible text appears or disappears (open shadow roots and same-origin iframes included), an element reaches a state, or the URL contains a text; checks every 100 ms. Returns the time waited; on timeout it fails naming what is missing. A dialog or debugger pause ends it at once.
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 |
|---|---|---|---|
| url | No | Text the tab's URL must contain. | |
| text | No | Visible text to wait for (case-sensitive). | |
| state | No | State 'selector' must reach ('hidden' = missing or without a visible box). Default: 'visible'. | |
| tab_id | No | Default: the active tab. | |
| selector | No | CSS selector, 'host >>> inner' (into an open shadow root or same-origin iframe) or snapshot ref (e12). | |
| text_gone | No | Visible text to wait to disappear, e.g. 'Loading'. | |
| timeout_ms | No | 1 to 30000. Default: 5000. | |
| instance_id | No | Default: 'default'. |