I need to automate desktop applications (not a web browser) testing on Windows, Mac and Linux. On Windows I use SendKeys, what do I use on Mac and Linux? Are there any cross-platform .NET Core SendKeys implementation that I can preferably use from xUnit?
There are two methods to send keystrokes to an application: SendKeys. Send and SendKeys. SendWait. The difference between the two methods is that SendWait blocks the current thread when the keystroke is sent, waiting for a response, while Send doesn't.
To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to specify to hold down SHIFT while E and C are pressed, use "+(EC)".
NET Core is cross-platform. It runs on Windows, OS X and multiple distributions of Linux. It also supports different CPU architectures. We're adding more Linux distribution and CPU architecture support with the eventual goal of .
Use SendWait to send keystrokes or combinations of keystrokes to the active application and wait for the keystroke messages to be processed. You can use this method to send keystrokes to an application and wait for any processes that are started by the keystrokes to be completed.
I am developing a library that does exactly this.
https://github.com/lucassklp/Desktop.Robot
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With