← Back to Input domain

Input.synthesizeTapGesture

Synthesizes a tap gesture over a time period by issuing appropriate touch events.

Domain: Input experimental

Parameters

NameTypeDescription
xnumberX coordinate of the start of the gesture in CSS pixels.
ynumberY coordinate of the start of the gesture in CSS pixels.
duration (optional)integerDuration between touchdown and touchup events in ms (default: 50).
tapCount (optional)integerNumber of times to perform the tap (e.g. 2 for double tap, default: 1).
gestureSourceType (optional)GestureSourceTypeWhich type of input events to be generated (default: 'default', which queries the platform for the preferred input type).

Example Request

{
  "id": 1,
  "method": "Input.synthesizeTapGesture",
  "params": {
    "x": 100,
    "y": 100
  }
}

Example Response

{
  "id": 1,
  "result": {}
}

Usage in Node.js

const result = await send('Input.synthesizeTapGesture', {"x": 100, "y": 100});
console.log(result);