NSelene icon indicating copy to clipboard operation
NSelene copied to clipboard

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

Open yashaka opened this issue 3 years ago • 1 comments

        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)

yashaka avatar Mar 30 '21 18:03 yashaka

@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;
        }

davespoon avatar Aug 30 '23 13:08 davespoon