Click an element by ref or by name
click_elementClicks an interactive element using a prior ref or its accessible name/text in one call, letting agents trigger buttons, links, or controls without a separate page read.
Instructions
Click an interactive element precisely — either a ref from a previous read_page call, or by matching its accessible name/text directly (no read_page needed first; this does the find-and-click in one call, which is the efficient path for a simple 'click the X button' step). Uses the same kernel-level input as the click tool, just aimed exactly instead of guessed.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "click_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | A ref like 'e3' from a prior read_page call. | |
| role | No | Narrow text search to this role, e.g. 'button', 'link'. | |
| text | No | Accessible name to search for (case-insensitive substring), if not using ref. | |
| button | No | left | |
| clicks | No | ||
| observe | No | false: skip the post-click transition watch (one quick 150 ms look); the caller confirms the result itself. Default true. | |
| activate | No | true: press a link in the page (its own click handler) instead of opening its href. Default false. | |
| window_address | No |