API Docs for: 0.2.7
Show:

Mouse Class

Defined in: lib/mouse.js:9
Module: Interaction
Parent Module: WebDriver

Mouse commands relative to a DOM-element

Constructor

Mouse

(
  • driver
  • parent
)

Defined in lib/mouse.js:9

Parameters:

Methods

_logMethodCall

(
  • event
)
private

Defined in lib/mouse.js:61

Logs a method call by an event

Parameters:

_requestJSON

(
  • method
  • path
  • [body]
)
private

Defined in lib/mouse.js:74

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

Parameters:

Returns:

:

buttonDown

(
  • [button=Mouse.BUTTON_LEFT]
)

Defined in lib/mouse.js:184

Click and hold any mouse button at the center of the element

Parameters:

  • [button=Mouse.BUTTON_LEFT] Number optional

buttonDownAt

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

Defined in lib/mouse.js:196

Click and hold any mouse button at a specified offset of the element

Parameters:

buttonUp

(
  • [button=Mouse.BUTTON_LEFT]
)

Defined in lib/mouse.js:211

Releases a mouse button at the center of the element

Parameters:

  • [button=Mouse.BUTTON_LEFT] Number optional

buttonUpAt

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

Defined in lib/mouse.js:223

Releases a mouse button at a specified offset of the element

Parameters:

click

(
  • [button=Mouse.BUTTON_LEFT]
)

Defined in lib/mouse.js:105

Click any mouse button at the center of the element

Parameters:

  • [button=Mouse.BUTTON_LEFT] Number optional

clickAt

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

Defined in lib/mouse.js:121

Click any mouse button at a specified offset of the element

Parameters:

doubleClick

()

Defined in lib/mouse.js:159

Double-clicks the element at the center of the element

doubleClickAt

(
  • xOffset
  • yOffset
)

Defined in lib/mouse.js:170

Double-clicks the element at a specified offset of the element

Parameters:

moveTo

(
  • xOffset
  • yOffset
)

Defined in lib/mouse.js:136

Move the mouse by an offset of the element

Parameters:

moveToCenter

()

Defined in lib/mouse.js:149

Move the mouse to the center of the element

Properties

BUTTON_LEFT

Int static

Defined in lib/mouse.js:29

Left mouse button

BUTTON_MIDDLE

Int static

Defined in lib/mouse.js:38

Middle mouse button. It is the scroll button on some mouses.

BUTTON_RIGHT

Int static

Defined in lib/mouse.js:47

Right mouse button