The release notes for 0.4-beta include "SendKeys functionality enabled for special characters". I have tried simulating the enter key using hello\n but this does not appear to work. Is this a bug or is there a different syntax for enter? What other characters are supported?
Sending a \n character through SendKeys generates a new line in our test project, but it does not simulate an enter key. We are still working on enabling simulating key presses such as the enter key; escape characters seem to be working.
^Any progress on this? I'm trying to force my app to log into Azure and to do this I need to enter the username and then TAB outside the field (Azure then redirects to a different login screen where I will fill in the password. Any other workaround for this? [NOTE: I am attempting to use this for UWP regression testing and so far it's been excellent!!!]
Thank you for your feedback @jonstoneman and @ddelapasse2! This special character support is now implemented in v0.6-beta release.
Note that to sending a special character key is done through a special unicode character constant. E.g.
editBox.SendKeys(OpenQA.Selenium.Keys.Tab);
editBox.SendKeys(OpenQA.Selenium.Keys.Enter);
More examples can be found on https://github.com/Microsoft/WinAppDriver/blob/v0.6-beta/Tests/W3CWebDriver/ElementSendKeys.cs
Hi @timotiusmargo ,
when I type to a text or special characters , driver types different text to notepad.exe as below.
`string text="This is some text and turkishbank.tiff /";
string symbols = "-=[]\;',./~!@#$%^&*()_+{}|:\"<>?";
driver.FindElementByClassName("Edit").SendKeys(text);
driver.FindElementByClassName("Edit").SendKeys(symbols);`
output1 : -臒眉,艧i枚莽.~!@#$%^&()_+{}|:"<>?
output2 : Th谋s 谋s some text and turk谋shbank莽t谋ff .
I found cause of the problem. When I change keyboard language from turkish to Eng(US),
worked for me. Bu I want to use turkish keyboard. Is there any solution?
Thanks for reporting back @barisgul - multi-region keyboards are currently not supported. This is something we'll look into for a potential enhancement in the future.
Hi @hassanuz
Is there a planned release date for supporting the multi region keyboards?
We use winium for now but we want switch to WinnAppDriver in our framework. This issue is very important for us.
You can assign a string where you use the alt key and the number combination of the character that you want to have.
Example: string x = keys.Alt + keys.numpad9 + keys.numpad6 + keys.alt;
Most helpful comment
Sending a \n character through SendKeys generates a new line in our test project, but it does not simulate an enter key. We are still working on enabling simulating key presses such as the enter key; escape characters seem to be working.