page_click
Click a CSS selector or viewport coordinates in a real browser tab, with hit-testing, auto-scroll, and iframe support for reliable automation.
Instructions
Click a CSS/structured locator or viewport coordinates in a specific real browser tab using background CDP input. Coordinates are viewport-relative CSS pixels (the space getBoundingClientRect reports), NOT the device pixels capture_page_screenshot returns -- on a scaled display divide a screenshot pixel by devicePixelRatio first. Ambiguous or unreachable targets dispatch nothing; the tab is not activated and the desktop cursor does not move. Selector offsets are measured from the element's top-left corner; an omitted axis uses the element centre. In selector mode, duplicate CSS/structured matches are reduced to visible, interactable candidates so hidden modal templates do not win, then the point is hit-tested before anything is dispatched: an element below the fold is scrolled into view, and a point owned by another element returns status 'obscured' (with occluded_by) or 'outside_viewport' having clicked nothing. Coordinate mode is not hit-tested -- coordinates name a pixel, not an element. A selector click crossing a non-identity CSS-transformed iframe returns status 'unsupported_frame_transform' without dispatch; query/type paths remain available. A structured selector may use {'selector': '#pay', 'frame': [...]} as a CSS alias, or {'frame': [...], 'x': 20, 'y': 30} to click a point inside the final same-origin or cross-origin frame; frame-point mode is not hit-tested. Nested frame locators also support OOPIFs. Framed clicks do not scroll automatically and check every parent for obstruction. A binding invalidated during the call returns stale_frame; inspect input_dispatched before recovery and never replay partial or unknown input.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| button | No | left | |
| clicks | No | ||
| timeout | No | ||
| offset_x | No | ||
| offset_y | No | ||
| selector | No | ||
| session_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||