browser_waitForSelector
Wait for a CSS selector to appear or disappear in the DOM. Polls every 200ms until found or timeout, enabling your script to proceed only when the page state changes.
Instructions
Wait for a CSS selector to appear (visible) or disappear from the DOM. Polls every 200ms until found or timeout.
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": "browser_waitForSelector"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | Max wait time in ms (default: 10000) | |
| visible | No | Require element to be visible (non-zero dimensions, default: true) | |
| selector | Yes | CSS selector to wait for | |
| disappear | No | Wait for element to disappear instead of appear (default: false) |