Forum Discussion
khoffman90
13 years agoContributor
Hi,
Sorry if the information isn't relevant but I thought I'd give it a go to help you.
If you used the default OnUnexpectedWindow, will it work? Does the message box retain focus?
I had something similar. Where if my application crashes our message box retains focus so the unexpected window event is triggered. In this case I used an if statement:
if(Window.WndCaption == "Fatal Error"){ do something}. Where Fatal Error is the name of our crash window.
If our application asserts, it also throws a warning box but this one does not retain focus. So I used the Wait method with exists to see if it had asserted. I guess you could add this to the on time out event or on error event? so if the test times out because of, for example, disconnection it checks for the error box.
Sorry if the information isn't relevant but I thought I'd give it a go to help you.
If you used the default OnUnexpectedWindow, will it work? Does the message box retain focus?
I had something similar. Where if my application crashes our message box retains focus so the unexpected window event is triggered. In this case I used an if statement:
if(Window.WndCaption == "Fatal Error"){ do something}. Where Fatal Error is the name of our crash window.
If our application asserts, it also throws a warning box but this one does not retain focus. So I used the Wait method with exists to see if it had asserted. I guess you could add this to the on time out event or on error event? so if the test times out because of, for example, disconnection it checks for the error box.