click
Activate web elements by role and accessible name, or by visible text. Returns match count along with any dialogs, new tabs, or JS errors, and navigates back after external links.
Instructions
Click an element the way a person would. Find it by role and accessible name, such as role button and name Save, or by its visible text when it has no useful role. When nothing matches the role and name, the name is tried as visible text. Returns what was clicked, how many elements matched, and any dialogs, new tabs or JavaScript errors that followed. When a click leads to another site, the browser goes back and says so.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nth | No | Which match to click when several elements match, counting from 0. Defaults to 0, the first one. | |
| name | No | Accessible name of the element, as the snapshot shows it, such as Save or Create automation. Without role, it is matched as visible text. | |
| role | No | ARIA role of the element, such as button, link, tab, checkbox, menuitem or textbox, as the snapshot shows it. Use it together with name. | |
| text | No | Visible text to click when the element has no useful role, such as the title of a card. Ignored when role is given. | |
| exact | No | Match the name or the text exactly, including case. Defaults to false, which also matches part of the text. |