click
Click elements by reference, CSS selector, visible text, or exact viewport coordinates. Uses real CDP mouse events, reports new tabs, and optionally returns the DOM diff.
Instructions
Click an element by ref, CSS selector, visible text, or viewport x/y (canvas, pixel-precise targets). Dispatches real CDP mouse events. A click that opens a new tab is reported in the response. The DOM diff (NEW/REMOVED/CHANGED) arrives with the next page action, or here with wait_for_diff: true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Viewport X in px; with y, not ref/selector | |
| y | No | Viewport Y in px; use with x | |
| ref | No | Element ref (preferred) | |
| text | No | Visible text (a11y name); no view_page needed, prefers interactive | |
| selector | No | CSS selector (fallback) | |
| wait_for_diff | No | Wait for the DOM diff before returning (default false, slower) |