Options
All
  • Public
  • Public/Protected
  • All
Menu

MouseClass class provides methods to emulate mouse input

Hierarchy

  • MouseClass

Index

Constructors

constructor

Properties

config

config: { autoDelayMs: number; mouseSpeed: number } = ...

Config object for MouseClass class

Type declaration

  • autoDelayMs: number
  • mouseSpeed: number

Methods

click

doubleClick

drag

  • 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

    Returns Promise<MouseClass>

getPosition

  • getPosition(): Promise<Point>

leftClick

move

  • 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 = ...

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

    Returns Promise<MouseClass>

pressButton

releaseButton

rightClick

scrollDown

  • 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

  • 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>

scrollRight

  • scrollRight(amount: number): Promise<MouseClass>
  • scrollRight scrolls right 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

  • 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>

setPosition