Shortcut for mouse.move(x, y[, options]), mouse.down([options]), mouse.up([options]).
X coordinate relative to the main frame's viewport in CSS pixels.
Y coordinate relative to the main frame's viewport in CSS pixels.
Optional
options: { Optional
Optional
button?: "left" | "right" | "middle"Defaults to left
.
Optional
clickdefaults to 1. See [UIEvent.detail].
Optional
delay?: numberTime to wait between mousedown
and mouseup
in milliseconds. Defaults to 0.
Shortcut for mouse.move(x, y[, options]), mouse.down([options]), mouse.up([options]), mouse.down([options]) and mouse.up([options]).
X coordinate relative to the main frame's viewport in CSS pixels.
Y coordinate relative to the main frame's viewport in CSS pixels.
Optional
options: { Optional
Optional
button?: "left" | "right" | "middle"Defaults to left
.
Optional
delay?: numberTime to wait between mousedown
and mouseup
in milliseconds. Defaults to 0.
Dispatches a mousedown
event.
Optional
options: { Optional
Optional
button?: "left" | "right" | "middle"Defaults to left
.
Optional
clickdefaults to 1. See [UIEvent.detail].
Dispatches a mousemove
event.
X coordinate relative to the main frame's viewport in CSS pixels.
Y coordinate relative to the main frame's viewport in CSS pixels.
Optional
options: { Optional
Optional
steps?: numberDefaults to 1. Sends intermediate mousemove
events.
Dispatches a mouseup
event.
Optional
options: { Optional
Optional
button?: "left" | "right" | "middle"Defaults to left
.
Optional
clickdefaults to 1. See [UIEvent.detail].
Dispatches a wheel
event. This method is usually used to manually scroll the page. See
scrolling for alternative ways to scroll.
NOTE Wheel events may cause scrolling if they are not handled, and this method does not wait for the scrolling to finish before returning.
Pixels to scroll horizontally.
Pixels to scroll vertically.
Generated using TypeDoc
The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport.
Every
page
object has its own Mouse, accessible with page.mouse.