WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

inconsistent implementation of SendKeys method

Open schrdori opened this issue 6 years ago • 2 comments

When calling AppiumWebElement.SendKeys("ABC"), the command is executed as POST /session/:sessionId/element/:id/value

But when calling Actions.SendKeys("ABC"), the command is executed as POST /session/:sessionId/keys

This was confusing to me.

            myWebElement.SendKeys(Keys.Alt + Keys.F4);

works fine. But with the action you have to release it. Otherwise it will stay pressed.

            action.SendKeys(Keys.Alt + Keys.F4 + Keys.Alt)

which is doing the same thing as

            action
                .KeyDown(Keys.Alt)
                .SendKeys(Keys.F4)
                .KeyUp(Keys.Alt)
                .Perform();

How to send POST /session/:sessionId/element/:id/value with the Actions API? And is this specified anywhere? Should I do all my interactions with the Actions API? What would you recommend?

schrdori avatar Jan 30 '20 13:01 schrdori

Right know i am using both in my framework. Will this be possible in the future? Or is some method gonna change functionality?

schrdori avatar Feb 04 '20 15:02 schrdori

just realized:

            action
                .KeyDown(Keys.Alt)
                .SendKeys(Keys.F4)
                .KeyUp(Keys.Alt)
                .Perform();

is not releasing the Alt Key...? Can anyone confirm?

schrdori avatar Feb 06 '20 16:02 schrdori