Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: mouse

[9:14] (extern: com.lehman.aussom.AMouse) extends: object

The mouse class provides low-level mouse input simulation for a page. Instances are obtained via page.mouse(). For most interactions prefer locator.click() or locator.hover(); use mouse for precise coordinate-based or drag-gesture scenarios.

Methods

  • move (double X, double Y)

    Moves the mouse pointer to the given page coordinates.

    • @p X is a double x coordinate in pixels.
    • @p Y is a double y coordinate in pixels.
    • @r This object.
  • click (double X, double Y)

    Clicks at the given page coordinates using the primary (left) mouse button.

    • @p X is a double x coordinate in pixels.
    • @p Y is a double y coordinate in pixels.
    • @r This object.
  • dblclick (double X, double Y)

    Double-clicks at the given page coordinates.

    • @p X is a double x coordinate in pixels.
    • @p Y is a double y coordinate in pixels.
    • @r This object.
  • down (string Button = "left")

    Presses the given mouse button down at the current position.

    • @p Button is an optional string button name: 'left', 'right', or 'middle'. Defaults to 'left'.
    • @r This object.
  • up (string Button = "left")

    Releases the given mouse button at the current position.

    • @p Button is an optional string button name: 'left', 'right', or 'middle'. Defaults to 'left'.
    • @r This object.
  • wheel (double DeltaX, double DeltaY)

    Dispatches a mouse wheel event at the current mouse position.

    • @p DeltaX is a double horizontal scroll amount in pixels.
    • @p DeltaY is a double vertical scroll amount in pixels.
    • @r This object.