Class: Playwright::Touchscreen
- Inherits:
-
PlaywrightApi
- Object
- PlaywrightApi
- Playwright::Touchscreen
- Defined in:
- lib/playwright_api/touchscreen.rb
Overview
The Touchscreen class operates in main-frame CSS pixels relative to the top-left corner of the viewport. Methods on the touchscreen can only be used in browser contexts that have been initialized with ‘hasTouch` set to true.
Instance Method Summary collapse
-
#tap_point(x, y) ⇒ Object
Dispatches a ‘touchstart` and `touchend` event with a single touch at the position (`x`,`y`).
Methods inherited from PlaywrightApi
Constructor Details
This class inherits a constructor from Playwright::PlaywrightApi
Instance Method Details
#tap_point(x, y) ⇒ Object
Dispatches a ‘touchstart` and `touchend` event with a single touch at the position (`x`,`y`).
NOTE: [‘method: Page.tap`] the method will throw if `hasTouch` option of the browser context is false.
11 12 13 |
# File 'lib/playwright_api/touchscreen.rb', line 11 def tap_point(x, y) wrap_impl(@impl.tap_point(unwrap_impl(x), unwrap_impl(y))) end |