MouseClass class provides methods to emulate mouse input

Constructors

Properties

config: MouseConfig = ...

Methods

  • drag drags the mouse along a certain path In summary, drag presses and holds the left mouse button, moves the mouse and releases the left button

    Parameters

    • path: Point[] | Promise<Point[]>

      The path of Points to drag along

    Returns Promise<MouseClass>

  • move moves the mouse cursor along a given path of Points, according to a movement type

    Parameters

    • path: Point[] | Promise<Point[]>

      Array of Points to follow

    • movementType: EasingFunction = linear

      Defines the type of mouse movement. Would allow to configured acceleration etc. (Default: linear, no acceleration)

    Returns Promise<MouseClass>

  • scrollDown scrolls down for a given amount of "steps" Please note that the actual scroll distance of a single "step" is OS dependent

    Parameters

    • amount: number

      The amount of "steps" to scroll

    Returns Promise<MouseClass>

  • scrollLeft scrolls left for a given amount of "steps" Please note that the actual scroll distance of a single "step" is OS dependent

    Parameters

    • amount: number

      The amount of "steps" to scroll

    Returns Promise<MouseClass>

  • scrollUp scrolls up for a given amount of "steps" Please note that the actual scroll distance of a single "step" is OS dependent

    Parameters

    • amount: number

      The amount of "steps" to scroll

    Returns Promise<MouseClass>