Took a little while to figure out why, but I think I've got it now. Problem is, I don't know how to easily overcome this issue for all possible windows apps and their child windows.
What it looks like is happening is this:
- Browser is open
- Windows App is behind browser
- Cursor is where windows app would be BUT browser is still in front (I think this is important)
- Ranorex goes to click windows app
- Ranorex brings windows app to front, to click the button
- Ranorex excutes button click just before the app comes in front of the browser window so the click hits the browser instead of the app
- No error is reported in clicking the button
- The app never receives the button click method
- The window that would have opened as a result of the button click does not - Ranorex throws an error saying the window is not found
When the browser went back to full screen the test would sometimes:
- fail every iteration
- fail one or two iterations
Any ideas on how I can work around this - resizing/moving the browser away from the windows app is not really a practical approach - if I could give a little more time for the application to come to the front, that would probably solve it, assuming the above is correct.
I've included a screenshot, in case it's useful, with some comments.