I have a pretty complex WPF application, but for simplicities sake, let's suppose I have a very simple WPF application with a Button on it.
I have a separate console application that I want to invoke the button on the WPF application. Using UIAutomation I'm having a little trouble finding the intuitive way to do this.
So far the steps for doing so look like:
- Use Process.Start to launch WPF application
- Use Process Id from above step to get Window handle for UI Automation framework
- Once Window handle is obtained, find Button child element of Window
- Invoke Button
This seems pretty straightforward, and I'm understanding the first 4 steps. The 5th step (invoking the Button), is where I'm having some trouble.
Anyone have experience with something like this?
View Complete Post