Skip to main content
Version: 1.3

Methods#

Mouse.click(x, y[, options])#

Shortcut for mouse.move, mouse.down and mouse.up.

Mouse.down([, options])#

  • options <Object> (Optional)
    • button: "left"|"right"|"middle" Defaults to left. (Optional)
    • clickCount <number< Defaults to 1. (Optional)
  • returns: <Promise;>

Dispatches a mousedown event

Mouse.drag(point1, point2)#

  • point is an array of x (number) and y (number) co-ordinate
  • returns: <Promise>

Shortcut for mouse.move, mouse.down, mouse.move and mouse.up.

Mouse.move(x, y[, options])#

  • x <number>
  • y <number>
  • returns: <Promise>

Dispatches a mousemove event

Mouse.up([, options])#

  • options <Object> (Optional)
    • button: "left"|"right"|"middle" Defaults to left. (Optional)
    • clickCount <number< Defaults to 1. (Optional)
  • returns: <Promise<void>>

Dispatches a mouseup event

ClickOptions#

Properties

  • button: "left"|"right"|"middle" Defaults to left. (Optional)
  • clickCount <number< Defaults to 1. (Optional)
  • delay <number> (Optional) Time to wait between mousedown and mouseup in milliseconds.