browser_click
Clicks a page element by CSS or text selector, scrolling it into view and sending real mouse events that work on React, Angular and CSP-strict sites.
Instructions
Click an element on the page. Supports CSS selectors AND text-based selectors. Auto-scrolls element into view. Uses real mouse events (works on Angular/React SPAs and CSP-strict sites like Google, Stripe). A text selector looks inside an open modal dialog first (a opened with showModal, or a visible element with aria-modal="true"), exact text before partial. If the mouse would not reach the target at its center - another element lies in front of it (an overlay, a dialog's backdrop), the target does not take clicks there (pointer-events, visibility, clipping), or a different control inside it would get the click (a delete button on a card; for a container that is not clickable itself, its own plain link with a real address (a hash route with a path, such as #/orders, counts; a fragment with no target on the page does not) does not count, nor does a web component's own button that covers it, nor a box with a checkbox, switch or radio role right next to a hidden field and the only one in the nearest label around it, a label of that field (a box inside a closed shadow root cannot be seen and is not counted), which counts as that field) - the answer is ok:false with error "covered" and covered_by. Found before the mouse is sent, nothing is sent; if it comes in front afterwards, the rest of the presses and clicks are stopped (a release the page moves elsewhere is let through), and the answer also has maybe_landed: true, because the page may already have reacted. If the click opens a JavaScript dialog (alert, confirm, prompt or "Leave site?"), Chrome freezes the page until it is answered, so whether the target got the click cannot be read: the answer is maybe_landed: true. While the dialog is still waiting it also carries dialog_open with its type and message - answer it with browser_handle_dialog, then check the state. If it was already closed or answered again before the reply was written, there is no dialog_open and the note says it is gone: do not answer it again. Examples: "button:text(Get started)", "text=Submit", "#my-button", "a.btn-primary"
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"selector": "<selector>"
},
"name": "browser_click"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | CSS selector or text selector. Text formats: "text=Click me" (any element), "button:text(Submit)" (specific tag) | |
| partition | No | Run this call in a partition from browser_partition (an id like "p1"). Leave it out for the default partition. An unknown or closed id is an error; the call is never sent to the default partition instead. |