Skip to content

demoSwipe

demoSwipe(page, locator, direction, distancePx?): Promise<void>

Defined in: video.ts:102

Perform a swipe gesture with a visible touch indicator.

In video mode, shows a circular touch indicator that follows the swipe path with eased motion and a fade-out effect at the end. When not in video mode, performs a fast programmatic swipe with no visual indicator.

Page

The Playwright page instance.

any

The element to swipe on.

"up" | "down" | "left" | "right"

Swipe direction: ‘up’, ‘down’, ‘left’, or ‘right’.

number = 200

Distance to swipe in pixels (default: 200).

Promise<void>