API Docs for: 0.2.7
Show:

GlobalMouse Class

Defined in: lib/globalMouse.js:11
Module: Interaction
Parent Module: WebDriver

Global mouse object handling global mouse commands

Constructor

GlobalMouse

(
  • driver
)

Parameters:

Methods

_logMethodCall

(
  • event
)
private

Logs a method call by an event

Parameters:

_moveTo

(
  • elementId
  • xOffset
  • yOffset
)
protected

Move the mouse by an offset of the specified element. If no element is specified, the move is relative to the current mouse cursor. If an element is provided but no offset, the mouse will be moved to the center of the element. If the element is not visible, it will be scrolled into view.

Parameters:

_requestJSON

(
  • method
  • path
  • [body]
)
private

Performs a context dependent JSON request for the current session. The result is parsed for errors.

Parameters:

Returns:

:

buttonDown

(
  • [button=Mouse.BUTTON_LEFT]
)

Click and hold the any mouse button at the current location of the mouse cursor

Parameters:

  • [button=Mouse.BUTTON_LEFT] Number optional

buttonDownAt

(
  • xOffset
  • yOffset
  • [button=Mouse.BUTTON_LEFT]
)

Click and hold the any mouse button relative to the current location of the mouse cursor

Parameters:

buttonUp

(
  • [button=Mouse.BUTTON_LEFT]
)

Releases the mouse button previously held at the current location of the mouse cursor

Parameters:

  • [button=Mouse.BUTTON_LEFT] Number optional

buttonUpAt

(
  • xOffset
  • yOffset
  • [button=Mouse.BUTTON_LEFT]
)

Releases the mouse button previously held at the current location of the mouse cursor

Parameters:

click

(
  • [button=Mouse.BUTTON_LEFT]
)

Click any mouse button at the current location of the mouse cursor

Parameters:

  • [button=Mouse.BUTTON_LEFT] Number optional

clickAt

(
  • xOffset
  • yOffset
  • [button=Mouse.BUTTON_LEFT]
)

Click any mouse button at an offset relative to the current location of the mouse cursor

Parameters:

doubleClick

()

Double-clicks at the current location of the mouse cursor

doubleClickAt

(
  • x
  • y
)

Double-clicks at the current location of the mouse cursor

Parameters:

moveTo

(
  • xOffset
  • yOffset
)

Move the mouse by an offset relative to the current mouse cursor position

Parameters: