Puppeteer: Must start a new Touch first
A touch move/end operation has no started touch to act on.
A touch move/end operation has no started touch to act on.
Error message
Must start a new Touch first
How this error happens
A touch move or end operation requires an active touch. Calling touchMove on a fresh touchscreen has no touch to move.
The snippets use an open Puppeteer page named page.
await page.touchscreen.touchMove(
100,
100
);
How to fix
Start the touch, move it, then end it.
await page.touchscreen.touchStart(
50,
50
);
await page.touchscreen.touchMove(
100,
100
);
await page.touchscreen.touchEnd();
Things to keep in mind
Use touchscreen.tap for a complete tap. A viewport with touch support may be needed for the application to respond as a touch interface.