wait_for_selector
Wait until an element matching a provided selector is present or reaches a specified state (attached, visible, hidden, or detached), enabling reliable automation.
Instructions
Wait until an element matching the selector is present.
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 |
|---|---|---|---|
| state | No | Desired element state (default: attached). | |
| timeout | No | Maximum wait time in milliseconds (default: 30 000). | |
| selector | Yes | CSS or XPath selector. |