wait_for
Waits for specified text to appear on a selected page, optionally until it becomes visible, so agents and scripts can synchronize with dynamic content.
Instructions
Wait for the specified text to appear on the selected page. By default, hidden text is also matched. Set visible to true to wait until the matched text is visible.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pageId": "<pageId>",
"text": "<text>"
},
"name": "wait_for"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Non-empty list of texts. Resolves when any value matches an accessible name exactly or is a substring of DOM text. Matching is case-sensitive. DOM text preserves spaces and newlines, unlike snapshot text which may normalize whitespace. Use the original whitespace or a shorter distinctive substring. | |
| pageId | Yes | Targets a specific page by ID. | |
| timeout | No | Maximum wait time in milliseconds. If set to 0, the default timeout will be used. | |
| visible | No | If true, wait until the matching text is visible. By default, hidden text also counts. |