Click element
clickClick a page element by its snapshot uid using real browser input events, so the action appears human. Scrolls the element into view, dodges overlays, and reports or bypasses blockers.
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 first, 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. Because those are delivered by
coordinate, the click is aimed at a point that actually hits the element:
several points inside it are hit-tested first, since a sticky header or a
banner can cover the centre. If none of them reach it, if_covered decides
what happens, and the response always says which path was taken.
Two other situations force the scripted fallback regardless: a touch-emulated target, where CDP mouse input can crash the renderer, and a CDP click that times out or errors. 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. | |
| browser | No | Which browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name. | default |
| dbl_click | No | Send a double-click instead of a single click. | |
| if_covered | No | What to do when something else sits on top of the element, so a real mouse click at its position would hit that instead. "report" (the default) does not click at all: it returns an error naming what is in the way, leaving the page untouched and the session indistinguishable from a person's. Dismiss the cookie banner, close the modal or scroll, then click again. "synthetic_click" dispatches the click on the element directly, which works through anything — but the page sees `isTrusted=false`, which is precisely the signal anti-bot systems look for. Choose it when the overlay cannot be dismissed, or when stealth does not matter on this site; not as a default. | report |
| 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 |