← Back to Input domain

Input.synthesizePinchGesture

Synthesizes a pinch 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.
scaleFactornumberRelative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).
relativeSpeed (optional)integerRelative pointer speed in pixels per second (default: 800).
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.synthesizePinchGesture",
  "params": {
    "x": 100,
    "y": 100,
    "scaleFactor": 1.0
  }
}

Example Response

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

Usage in Node.js

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