wait_for_selector
Waits for a web element matching a CSS selector to appear or reach a specified state (attached, detached, visible, hidden) in an Electron application, returning element count and bounding box data.
Instructions
Wait until an element matching a selector appears (or reaches a given state: attached/detached/visible/hidden). Returns element count and the bounding box of the first match so you do not need a follow-up eval. Honours timeoutMs (default 5000).
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 |
|---|---|---|---|
| selector | Yes | ||
| state | No | Default visible. | |
| timeoutMs | No | Default 5000. |