Skip to content

[πŸš€ Feature]: Add ControlOrMeta valueΒ #14835

@RenderMichael

Description

@RenderMichael

Feature and motivation

There are times when we want to press the "copy" keyboard shortcut. However, that option is Ctrl+c on Windows/Linux, and Command+c on a Mac.

This feature is needed even in our own tests:

private string PrimaryModifier()
{
return (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) ? Keys.Command : Keys.Control;
}

Playwright has a helper for this on its keyboard: ControlOrMeta. We should have the same.

Usage example

element.SendKeys(Keys.ControlOrMeta + "x");

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions