Wait For Selector
wait_for_selectorWaits for an element to appear, become visible, or disappear, ideal after a click that loads content. Reports timeout with waitedMs and fails fast on broken selectors or page errors.
Instructions
Poll until an element appears, becomes visible, or disappears. Use after a click that loads content. On timeout it says so explicitly with waitedMs and the last counts, and a broken selector or page error fails straight away instead of burning the whole timeout. The visible state ignores screen-reader clipping (boxes under 2x2 px, inset clip-path), which nothing can actually click.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| exact | No | For "text=" selectors, require the whole trimmed text to equal the label instead of containing it. No effect on CSS selectors. | |
| state | No | Condition to wait for | visible |
| tab_id | No | Arc tab id from list_tabs. Omit to use this agent's current tab, falling back to whatever tab is active in Arc. | |
| verbose | No | Include the bulky element rect and longer attribute values | |
| selector | Yes | CSS selector, or "text=Some label" to match on visible text (substring, exact matches ranked first) | |
| timeout_ms | No | Give up after this long, capped at 30000ms because a longer call is killed by the client before it can answer. To wait longer, call wait_for_selector again: every call returns the current counts, so repeated short waits tell you more than one long one. |