Skip to main content
Page touchscreen methods for the Playwright driver.

touchscreen.tap

Dispatches a touchstart and touchend event with a single touch at the position (x, y).
This method simulates a tap gesture on a touchscreen device.Note: The page must be initialized with hasTouch option of the browser context set to true.
Upstream docs
x
number
required
X coordinate relative to the main frame viewport in CSS pixels.
y
number
required
Y coordinate relative to the main frame viewport in CSS pixels.
await page.touchscreen.tap(0, 0);