Click element
Click an element (waits until it is visible and enabled).
Command in the Browser toolkit · id ooa.browser/click · 11 inputs, no outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Captured object | Dictionary | No | The captured object from Capture or Pick in OneAgentStudio: the element's properties to match (each with use and a match rule: equals, not_equals, contains, starts_with, ends_with, wildcard or regex), search_by (properties, css or xpath), index and iframes. Used instead of the selector when given. | |
| Selector | String | No | Element selector, used when no captured object is given: CSS (#id, .class), text="Sign in", role=button[name="Save"] or xpath=//input[@name='q']. | |
| Double-click | Boolean | No | false | Double-click. |
| Wait up to (milliseconds) | Number | No | 30000 | How long to wait for the element, in milliseconds. |
| Session | String | No | browser | Session name. |
| Alternatives | Dictionary | No | Self-healing fallbacks recorded with the element (Pick records them): automation_id, name, id, aria_label, tag, class, index, text, relative {anchor, direction}. Tried in that order when the selector finds nothing; the one that works is logged. | |
| Window | Dictionary | No | Which window to act in. Leave empty to use the session's current tab. {"source": "browser", "title": "Invoice * - Shop", "title_match": "wildcard", "url": "...", "url_match": "contains", "browser": "edge"} switches to the first open tab whose title and/or address matches (also in attached browsers, and in one listening on port 9222); {"source": "variable", "variable": "session name"} uses that browser session; {"source": "application", "title": "..."} names a desktop window, which works only when it is a window of an attached browser. Matches: wildcard (default for the title), contains (default for the address), equals or regex; text matches ignore case. Values may use variables. | |
| Click method | String | No | mouse | mouse: a real click (scrolls the element into view and waits until it can be clicked); javascript: fire the click on the element itself, for elements covered by an advert or a banner. |
| Force | Boolean | No | false | Mouse click without waiting until nothing covers the element. |
| Then wait for | String | No | nothing | After the click, wait until the page has loaded, or until the element in wait_selector appears or is gone (for example a spinner): no fixed Delay needed when Next keeps the same page. |
| Wait selector | String | No | With then_wait_for element_visible or element_gone: the element to wait for (a selector). |