Back to Puppeteer

Touchscreen.touchMove() method

website/versioned_docs/version-24.40.0/api/puppeteer.touchscreen.touchmove.md

19.2.2851 B
Original Source

Touchscreen.touchMove() method

Dispatches a touchMove event on the first touch that is active.

Signature

typescript
class Touchscreen {
  touchMove(x: number, y: number): Promise<void>;
}

Parameters

<table><thead><tr><th>

Parameter

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

x

</td><td>

number

</td><td>

Horizontal position of the move.

</td></tr> <tr><td>

y

</td><td>

number

</td><td>

Vertical position of the move.

</td></tr> </tbody></table>

Returns:

Promise<void>

Remarks

Not every touchMove call results in a touchmove event being emitted, depending on the browser's optimizations. For example, Chrome throttles touch move events.