In my initial days, I have struggled lot to simulate keyboard inputs. To simulate keyboard inputs in CodedUI as easy as Selenium but sometime it’s hard to find CodedUI solution over the Google. With this post I am trying to break that hardness. So here we go…
if you wanted to send single key…
If you wanted to send combination keys like ALT+F4.
If you wanted to press particular key 10 times, use below syntax-
//Below syntax will press LEFT ARROW key 10 times.
For more details you can go through this link http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.send(v=vs.110).aspx