class Playwright::Mouse
“‘
page.mouse.up()
page.mouse.move(0, 0)
page.mouse.move(100, 0)
page.mouse.move(100, 100)
page.mouse.move(0, 100)
page.mouse.down()
page.mouse.move(0, 0)
# using ‘page.mouse’ to trace a 100x100 square.
“`python sync
Every `page` object has its own Mouse, accessible with [`property: Page.mouse`].
The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport.
def click(
def click( x, y, button: nil, clickCount: nil, delay: nil) wrap_impl(@impl.click(unwrap_impl(x), unwrap_impl(y), button: unwrap_impl(button), clickCount: unwrap_impl(clickCount), delay: unwrap_impl(delay))) end
def dblclick(x, y, button: nil, delay: nil)
Shortcut for [`method: Mouse.move`], [`method: Mouse.down`], [`method: Mouse.up`], [`method: Mouse.down`] and
def dblclick(x, y, button: nil, delay: nil) wrap_impl(@impl.dblclick(unwrap_impl(x), unwrap_impl(y), button: unwrap_impl(button), delay: unwrap_impl(delay))) end
def down(button: nil, clickCount: nil)
def down(button: nil, clickCount: nil) wrap_impl(@impl.down(button: unwrap_impl(button), clickCount: unwrap_impl(clickCount))) end
def move(x, y, steps: nil)
def move(x, y, steps: nil) wrap_impl(@impl.move(unwrap_impl(x), unwrap_impl(y), steps: unwrap_impl(steps))) end
def up(button: nil, clickCount: nil)
def up(button: nil, clickCount: nil) wrap_impl(@impl.up(button: unwrap_impl(button), clickCount: unwrap_impl(clickCount))) end
def wheel(deltaX, deltaY)
**NOTE**: Wheel events may cause scrolling if they are not handled, and this method does not
Dispatches a `wheel` event.
def wheel(deltaX, deltaY) wrap_impl(@impl.wheel(unwrap_impl(deltaX), unwrap_impl(deltaY))) end