Home > assistive-playwright-client > VMMouse > move
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
.
Signature:
move(x: number, y: number, options?: {
steps?: number | undefined;
origin?: ElementHandle<HTMLElement | SVGElement> | null;
}): Promise<void>;
Parameter | Type | Description |
---|---|---|
x | number | horizontal destination position of the mouse in pixels |
y | number | vertical destination position of the mouse in pixels |
options | { steps?: number | undefined; origin?: ElementHandle<HTMLElement | SVGElement> | null; } | steps : number of steps to use when moving the mouse from its current position to the destination, defaults to 1 origin : DOM element whose center is the origin of the coordinates passed in x and y . If null or undefined, the coordinates are relative to the top-left corner of the viewport. |
Returns:
Promise<void>