Mouse

import {Mouse} from 'cabbie-sync';

Mouse commands relative to a DOM-element

Methods

buttonDown(button?): void

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

buttonDownAt(xOffset, yOffset, button?): void

xOffset
number
yOffset
number
button
MouseButton

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

buttonUp(button?): void

Releases a mouse button at the center of the element

buttonUpAt(xOffset, yOffset, button?): void

xOffset
number
yOffset
number
button
MouseButton

Releases a mouse button at a specified offset of the element

click(button?): void

Click any mouse button at the center of the element

clickAt(xOffset, yOffset, button?): void

xOffset
number
yOffset
number
button
MouseButton

Click any mouse button at a specified offset of the element

doubleClick(): void

Double-clicks the element at the center of the element

doubleClickAt(xOffset, yOffset): void

xOffset
number
yOffset
number

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

moveTo(xOffset, yOffset): void

xOffset
number
yOffset
number

Move the mouse by an offset of the element

moveToCenter(): void

Move the mouse to the center of the element