Home > assistive-playwright-client > VMMouse
Object implementing the Mouse interface from playwright, it can send low-level mouse events to the virtual machine.
Signature:
export declare class VMMouse implements Mouse
Implements: Mouse
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(vm, lastPosition, calibration) | Creates a VMMouse object. |
| Property | Modifiers | Type | Description |
|---|---|---|---|
| calibration | CalibrationResult | Reference to the calibration results that are used to convert coordinates. | |
| lastPosition | SimplePosition | Reference to the object holding the last position of the mouse in the screen coordinates. | |
| vm | VM | Reference to the virtual machine |
| Method | Modifiers | Description |
|---|---|---|
| click(x, y, options) | Shortcut for move, down and up. | |
| dblclick(x, y, options) | Shortcut for VMMouse.click() with clickCount option set to 2. |
|
| down(options) | Sends a low-level mousedown event to the virtual machine. | |
| move(x, y, options) | Moves the mouse to the specified position, expressed either as coordinates in the viewport (relative to the top-left corner), or coordinates relative to the center of the DOM element passed as origin in the options. |
|
| up(options) | Sends a low-level mouseup event to the virtual machine. | |
| wheel(deltaX, deltaY) |