Skip to content

[Feature]: Support for the steps option for mouse.click #38006

@souvlakias

Description

@souvlakias

🚀 Feature Request

Since mouse.click is defined as:

Shortcut for mouse.move(x, y[, options]), mouse.down([options]), mouse.up([options])

it should accept the steps option.
In other words, types PageMouseClick<Options/Params> should be an intersection of their own properties and the properties of PageMouseMove<Options/Params>, respectively.

EDIT: The same follows for dblclick

Example

One should be able to call

await page.mouse.click(x, y, { delay: 100 , steps: 10});

instead of:

await page.mouse.move(x, y, { steps: 10 });
await page.mouse.click(x, y,{ delay: 100 });

Motivation

Utilize Playwright's test videos as instructional material for new users of the web app.
A linear mouse movement using steps is more user-friendly and therefore preferred.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions