Skip to main content
POST
/
v1
/
sessions
/
{sessionId}
/
mouse
/
click
Mouse Click
curl --request POST \
  --url https://api.anchorbrowser.io/v1/sessions/{sessionId}/mouse/click \
  --header 'Content-Type: application/json' \
  --header 'anchor-api-key: <api-key>' \
  --data '
{
  "x": 123,
  "y": 123,
  "button": "left",
  "selector": "<string>",
  "timeout": 123,
  "index": 123
}
'
{
  "status": "<string>"
}

Authorizations

anchor-api-key
string
header
required

API key passed in the header

Path Parameters

sessionId
string<uuid>
required

The ID of the browser session

Body

application/json

Mouse click request. Must provide either (x, y) coordinates or a selector, but not both.

x
number

X coordinate

y
number

Y coordinate

button
enum<string>

Mouse button to use

Available options:
left,
middle,
right
selector
string

A valid CSS selector for the requested element

timeout
number

If a selector was passed, timeout in ms for waiting for the DOM element to be selected. Defaults to 5000 (5 seconds).

index
number

If a selector was passed and multiple elements match the selector, the index of the element in the list (0-based). Defaults to 0.

Response

Click performed successfully

status
string