Skip to content

[Feature] Allow keyboard methods to be OS agnostic #12168

Closed
@MartinP-Autopilot

Description

This is the advice currently on https://playwright.dev/docs/api/class-keyboard

// on Windows and Linux
await page.keyboard.press('Control+A');
// on macOS
await page.keyboard.press('Meta+A');

The script should not have to implement special handling to ensure that these methods work in the expected manner across each OS, the method should allow something like

await page.keyboard.press('ControlOrMeta+A');

and the method should handle the OS detection transparently.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions