This is probably a bit crazy/nuts, but is there any way to perform WPF Automation Testing without using the MS Automation Peer framework?
There are several times when I actually need the UIElement/FrameworkElement and would like to access that directly. I was looking into Snoop to try and deal with it, but it looked like it was a bit painful to "inject" into a process.
I've tried connecting to the process that is launched (we're currently using SpecFlow), but any attempt to marshall the Process or Window thread (I've looked for the actual Window's proc ID and tried connecting) results in a null from the HwndSource. I was trying to also create an instance of the Application inside my unit test, but it looks like NUnit has issues with launching the Application in the background (even on a STA Thread), because the second a test starts trying to load, the Application starts blocking.
Has anyone had any success in doing something else? My only thoughts to "solve" the problem now would be to create a special AutomationPeer that I could reflect to and then get the FrameworkElement from, or something like that.
Any thoughts?