wait_for
Polls for UI elements to appear or disappear after actions trigger changes, supporting flexible matching criteria and timeout control.
Instructions
Wait for elements to appear or disappear.
Polls until matching elements are found (or gone) or timeout.
Use after actions that trigger UI changes.
Args:
element: Text to search for. Pass a single string (e.g.
"Submit") or a list of strings (e.g. ["Success", "Error"])
for multi-query mode. With mode="any", returns as soon
as any query matches. With mode="all", waits until every
query has matched.
app: Scope to this application.
window_id: Scope to this window.
role: Only match this role.
states: Only match elements with ALL these states.
fields: Which fields to search (default: ["name"]).
mode: "any" (return when any query matches) or "all"
(wait for all queries to match). Only meaningful when
element is a list.
timeout: Maximum seconds to wait (default 10).
source: "full" (default), "ax", "native", or "dom".
max_results: Maximum elements to return (default 5).
wait_for_new: If true, ignore elements already present -- wait for NEW ones.
gone: If true, wait for matching elements to DISAPPEAR instead.Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| element | Yes | ||
| app | No | ||
| window_id | No | ||
| role | No | ||
| states | No | ||
| fields | No | ||
| mode | No | any | |
| timeout | No | ||
| source | No | full | |
| max_results | No | ||
| wait_for_new | No | ||
| gone | No |