Assistive-Webdriver

Home > assistive-playwright-client > VMMouse > click

VMMouse.click() method

Shortcut for move, down and up.

Signature:

click(x: number, y: number, options?: {
        button?: "left" | "middle" | "right" | undefined;
        clickCount?: number | undefined;
        delay?: number | undefined;
        origin?: ElementHandle<HTMLElement | SVGElement> | null;
    }): Promise<void>;

Parameters

Parameter Type Description
x number horizontal destination position of the mouse in pixels
y number vertical destination position of the mouse in pixels
options { button?: “left” | “middle” | “right” | undefined; clickCount?: number | undefined; delay?: number | undefined; origin?: ElementHandle<HTMLElement | SVGElement> | null; } button: mouse button to use, defaults to "left" clickCount: number of down and up events to send, defaults to 1 delay: delay in milliseconds between down and up events 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>