dom_wait_for
Ensure a DOM element is present by polling every 100ms until the CSS selector matches, with optional visibility check and timeout to control waiting.
Instructions
Wait for an element to appear in the DOM (polls every 100ms).
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": {
"targetId": "<targetId>",
"selector": "<selector>"
},
"name": "dom_wait_for"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | Timeout in milliseconds (default: 5000) | |
| visible | No | Also require the element to be visible (default: false) | |
| selector | Yes | CSS selector to wait for | |
| targetId | Yes | Target ID of the tab |