Click element
clickClicks an element by snapshot uid with real CDP events, appearing as a trusted user action. Auto-scrolls to the element and handles layout shifts.
Instructions
Click an element addressed by its snapshot uid.
This is the click you want in almost all cases — prefer it over click_at, because a uid survives layout shifts and raw coordinates do not. The element is scrolled into view automatically, so it need not be visible beforehand.
Sends real CDP input events, so the page sees isTrusted=true, which is the
entire point of an undetected driver. Two situations force a scripted
fallback (element.click() plus synthetic events, isTrusted=false): a
touch-emulated target, where CDP mouse input can crash the renderer, and a
CDP click that times out or errors. The response says so explicitly whenever
that happens, so a detectable click is never silent. Every step is bounded
at 10s, so a wedged page cannot hang the call.
On "unknown uid", take a fresh take_snapshot and retry with the new uid.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | Element uid from the most recent take_snapshot, e.g. "4_12". uids are invalidated whenever the page changes — if you get "unknown uid", take a fresh snapshot and retry with the new uid. | |
| dbl_click | No | Send a double-click instead of a single click. | |
| include_snapshot | No | Append a fresh page snapshot to the response. Worth it when this action changes the page and take_snapshot would be your next call anyway — it saves a round trip, at the cost of a much larger response. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |