Wait for element
wait_for_selectorWait for a CSS selector to appear on the page, checking repeatedly until the element exists. Ideal for known markup or localized text; then take a snapshot for interaction.
Instructions
Wait until an element matching a CSS selector appears on the page.
The structural counterpart to wait_for: use it when you know the markup but not the wording, or when the wording is localised.
Polls about three times a second and returns as soon as the element shows up. Unlike wait_for it does not return a snapshot, so follow with take_snapshot when you intend to interact.
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": {
"selector": "<selector>"
},
"name": "wait_for_selector"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| browser | No | Which browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name. | default |
| timeout | No | Maximum wait in milliseconds before giving up. | |
| visible | No | Also require the element to have a non-zero size. Use this with frameworks that insert an element into the DOM before rendering it — presence alone would otherwise resolve too early. | |
| selector | Yes | CSS selector to wait for, e.g. "#login" or ".results .item". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |