Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consider adding as extensions to support namespace things like Overwrite via Ctrl/Command + A + keys #74

Open
yashaka opened this issue Mar 30, 2021 · 1 comment

Comments

@yashaka
Copy link
Owner

yashaka commented Mar 30, 2021

        public static SeleneElement Overwrite(
            this SeleneElement element,
            string value)
        {
            element.Type(Keys.Control + "a" + Keys.Control + value);
            
            return element;
        }

but we should ensure that it will be cross-platform (on mac os we should use command instead of control)

@davespoon
Copy link
Contributor

davespoon commented Aug 30, 2023

@yashaka is something like this enough?:

public static SeleneElement Overwrite(this SeleneElement element, string value)
        {
            if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
            {
                element.Type(Keys.Command + "a" + Keys.Command + value);
            }
            else
            {
                element.Type(Keys.Control + "a" + Keys.Control + value);
            }

            return element;
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants