Input.synthesizeScrollGestureSynthesizes a scroll gesture over a time period by issuing appropriate touch events.
| Name | Type | Description |
|---|---|---|
x | number | X coordinate of the start of the gesture in CSS pixels. |
y | number | Y coordinate of the start of the gesture in CSS pixels. |
xDistance (optional) | number | The distance to scroll along the X axis (positive to scroll left). |
yDistance (optional) | number | The distance to scroll along the Y axis (positive to scroll up). |
xOverscroll (optional) | number | The number of additional pixels to scroll back along the X axis, in addition to the given distance. |
yOverscroll (optional) | number | The number of additional pixels to scroll back along the Y axis, in addition to the given distance. |
preventFling (optional) | boolean | Prevent fling (default: true). |
speed (optional) | integer | Swipe speed in pixels per second (default: 800). |
gestureSourceType (optional) | GestureSourceType | Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). |
repeatCount (optional) | integer | The number of times to repeat the gesture (default: 0). |
repeatDelayMs (optional) | integer | The number of milliseconds delay between each repeat. (default: 250). |
interactionMarkerName (optional) | string | The name of the interaction markers to generate, if not empty (default: ""). |
{
"id": 1,
"method": "Input.synthesizeScrollGesture",
"params": {
"x": 100,
"y": 100
}
}
{
"id": 1,
"result": {}
}
const result = await send('Input.synthesizeScrollGesture', {"x": 100, "y": 100});
console.log(result);