So, I am working on a new feature for our WPF application. I would like to use BDD especially since the interactions are clearly defined already. I have written specs for web projects, but never a desktop application. So, my problem is that I would like to be able to test state, and avoid UI scraping, but I do not see a way to do this?
Here is the problem:
I see that I have to start the application, login, and then perform the actions and scrape the screen for the state (all using UIAutomation)
I would like to be able to get the state from the code, however. So, the best I can think of is to drive it through the MVVM structure. However, I guess the problem that I see is that some of the flow from one form to the next comes through the UI bindings, so is there a way to do that via MVVM? Do I have to run this all through my UI?
I keep spinning myself around trying to think how to implement this. Is there a best practice for the above?