wait_for
Pauses automation until a CSS selector appears, hides, or enables, text, URL, or console matches, or a node count is reached.
Instructions
Wait until a selector exists/hides/enables, text/URL/console matches, or node count is met
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 |
|---|---|---|---|
| text | No | Text that must appear in document.body | |
| hidden | No | CSS selector that must be absent or not visible | |
| enabled | No | CSS selector that must exist and not be disabled | |
| minCount | No | Minimum matches required for countSelector | |
| selector | No | CSS selector that must exist | |
| targetId | No | ||
| processId | No | Target process ID. Omit if only one app is running. | |
| timeoutMs | No | ||
| urlIncludes | No | Substring that location.href must include | |
| countSelector | No | CSS selector to count (use with minCount) | |
| consoleIncludes | No | Substring that a buffered console message must include | |
| screenshotOnTimeout | No | If true, save a PNG to the OS temp dir when wait times out |