Click
clickDispatch a real pointer sequence on a page element selected by CSS, text, ref, role, label, or placeholder; scrolls into view so framework handlers fire.
Instructions
Click an element. Accepts a CSS selector or "text=Label". Scrolls it into view and dispatches a real pointer sequence, so framework handlers fire. "text=Label" matches on visible text as a substring, with exact matches ranked first and visible elements ahead of hidden ones, so a short label also matches longer ones. Check the returned "matches" count, and pass exact when it is above 1. Also accepts "ref=e12" from snapshot (re-resolved and reported as reResolved when the page re-rendered, a clear stale-ref failure when the element is truly gone), "role=button[name="Save"]", "label=Email" and "placeholder=Search". Returns urlBefore, the url as it was immediately before the click: the tab snapshot can be taken before a navigation settles, so follow with wait_for_load when the click navigates. A match inside a control (a label span in a button) is checked against that control, returned as "control": a disabled one fails with ok false and nothing is clicked. When another element (a modal backdrop, an overlay) covers the target, or it has pointer-events none, the click still goes through but the result carries coveredBy and a warning. On success it waits for the page to go quiet and reports settledMs (and settled false if the DOM was still changing at the cap), so the next read sees the result of the action.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nth | No | Which match to click when several exist, 0-based. For text= selectors the order is exact matches first, then substring matches, visible before hidden within each, then DOM order. | |
| exact | No | For "text=", "label=" and "placeholder=" selectors, require the whole trimmed text to equal the label instead of containing it. No effect on CSS, ref= or role= selectors. | |
| tab_id | No | Arc tab id from list_tabs. Omit to use this agent's current tab. A tool that changes a tab will not fall back to the tab the user is looking at, so pass this or call open_url first. | |
| verbose | No | Include the bulky element rect and longer attribute values | |
| selector | Yes | CSS selector, or one of: "text=Some label" (visible text, case-insensitive substring, exact matches ranked first); "ref=e12" (a ref from snapshot, re-resolved if the page re-rendered); "role=button[name="Save"]" (ARIA or implicit role, name an exact match, or name~="sav" for a substring); "label=Email" (the control a label names); "placeholder=Search" | |
| settle_ms | No | After acting, wait until the page's DOM has been quiet for this many ms, then report settledMs. 0 skips the wait. The whole wait is capped at 1500ms; a page that never goes quiet reports settled false. |