Is there any way to create a coded UI test for a WPF application that only detects the parent window element? We are using a component suite that does not support Coded UI tests, but I would still like to be able to automate the UI for testing purposes. Ideally, such a solution would detect the parent window element, then use pixel offsets for automating any button presses, etc.
Thanks.
You can use the Coded UI Test Builder to discover the properties you need, but the basic method for getting a window is pretty simple.
Here’s a really simple class representing a window:
And here’s a test