The /browser/sessions/{id}/mouse/click endpoint dispatches a mouse click against the currently active page inside a browser session. It supports two modes:
Coordinates — click at (x, y) in viewport CSS pixels.
Selector — click the center of an element matched by a CSS selector. Waits for the element to be visible.
The two modes are mutually exclusive. Pass either (x, y)orselector, never both.
Mouse button to press. One of left, right, middle, back, forward. The back and forward buttons map to the side buttons used for browser navigation on some sites.
Coordinate system: coordinates are viewport-relative in CSS pixels. On HiDPI pages, they do not need to be scaled by devicePixelRatio — the browser handles that internally.
Selector mode: the endpoint waits up to timeout ms for the first match to become visible, then clicks the center of its bounding box. Use index to target the Nth match.
Modifiers: holdKeys are held for the full duration of every click in a multi-click sequence.