MCPcopy Index your code
hub / github.com/microsoft/playwright-python / tap

Method tap

playwright/async_api/_generated.py:1792–1807  ·  view source on GitHub ↗

Touchscreen.tap Dispatches a `touchstart` and `touchend` event with a single touch at the position (`x`,`y`). **NOTE** `touchscreen.tap()` will throw if the `hasTouch` option of the browser context is false. Parameters ---------- x : float X coo

(self, x: float, y: float)

Source from the content-addressed store, hash-verified

1790class Touchscreen(AsyncBase):
1791
1792 async def tap(self, x: float, y: float) -> None:
1793 """Touchscreen.tap
1794
1795 Dispatches a `touchstart` and `touchend` event with a single touch at the position (`x`,`y`).
1796
1797 **NOTE** `touchscreen.tap()` will throw if the `hasTouch` option of the browser context is false.
1798
1799 Parameters
1800 ----------
1801 x : float
1802 X coordinate relative to the main frame's viewport in CSS pixels.
1803 y : float
1804 Y coordinate relative to the main frame's viewport in CSS pixels.
1805 """
1806
1807 return mapping.from_maybe_impl(await self._impl_obj.tap(x=x, y=y))
1808
1809
1810mapping.register(TouchscreenImpl, Touchscreen)

Callers

nothing calls this directly

Calls 2

from_maybe_implMethod · 0.80
tapMethod · 0.45

Tested by

no test coverage detected