Mouse

Mouse

new Mouse(page)

Source:
Mouse
Parameters:
Name Type Description
page Page

The page which this mouse cursor points to

Methods

(async) click(x, y, optionsopt) → {Promise}

Source:
Parameters:
Name Type Attributes Description
x number
y number
options object <optional>
Properties
Name Type Attributes Default Description
button string <optional>
'left'

left, right, or middle

clickCount number <optional>
1

UIEvent.detail

delay number <optional>
0

Time to wait between mousedown and mouseup in milliseconds

Returns:
Type
Promise

down(optionsopt) → {Promise}

Source:

Dispatches a mousedown event

Parameters:
Name Type Attributes Description
options object <optional>
Properties
Name Type Attributes Default Description
button string <optional>
'left'

left, right, or middle

clickCount number <optional>
1

UIEvent.detail

Returns:
Type
Promise

(async) move(x, y, optionsopt) → {Promise}

Source:

Dispatches a mousemove event

Parameters:
Name Type Attributes Description
x number
y number
options object <optional>
Properties
Name Type Default Description
steps number 1

Sends intermediate mousemove events

Returns:
Type
Promise

up(optionsopt) → {Promise}

Source:

Dispatches a mouseup event

Parameters:
Name Type Attributes Description
options object <optional>
Properties
Name Type Attributes Default Description
button string <optional>
'left'

left, right, or middle

clickCount number <optional>
1

UIEvent.detail

Returns:
Type
Promise