browser_wait_for_selector
Wait for a web element to reach a specific state like visible, hidden, attached, or detached in the browser, enabling reliable automation of page interactions.
Instructions
Wait for an element to reach a specific state.
States:
attached: Element is in the DOM
detached: Element is removed from the DOM
visible: Element is visible on the page
hidden: Element is hidden or removed
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_wait_for_selector"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | CSS selector to wait for | |
| state | No | State to wait for | visible |
| timeout | No | Timeout in milliseconds |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |