wait_for
Wait for an element to become visible, hidden, attached, or detached. Syncs automation with UI state to avoid flaky tests.
Instructions
Wait for an element to appear, disappear, or change visibility.
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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | No | Wait until element is visible/hidden/attached/detached | visible |
| target | No | Which context to interact with | page |
| timeout | No | Timeout in milliseconds | |
| selector | Yes | CSS selector to wait for |