wait_for_element
Wait for a matching UI element to appear or reach a specified state after async actions, and detect blocking modal dialogs early instead of timing out.
Instructions
Wait until a matching element exists and optionally has the given state. Useful after clicks that trigger async UI changes.
If a modal dialog keeps the window disabled for a few seconds, the wait ends early with an error naming it and the dialog's window info, so it can be answered instead of waiting out the 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": {
"window_id": "<window_id>"
},
"name": "wait_for_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| role | No | ||
| state | No | ||
| timeout | No | ||
| window_id | Yes |