Handling Un-Expected window
I am using TestComplete to automate one of the metering application.
It will take more than one and half an hour to execute the entire script of the application.Meanwhile when the scripts are executing application is hanging and "Problem encountered in the application" unexpected window is appearing which is interrupting my script execution.
The unexpected window is having a close window. clicking on close button is closing the unexpected window and inturn the application.
Note: This Unexpected window can come anytime during the script execution.
To handle this unexpected window, we have used handler operation.
Following are the steps followed:
1.Click on General events and selected "Un expected window" events handler. On the right pane again selected "Unexpected window handler" and click on New option.
2.Clicked on New unit and Created a script called "UnExpectedwindowHandler".
3.Inside the script , a blank subroutine automatically got declared.
4. We gave the Reference of the unexpected window and waited for it.Gave a condition, if that exists, clicked and close button in the unexpected window and give a log message and continue the execution.
5.Added USEUNIT UnExpectedwindowHandler in the other scripts.
Even after this unexpected window is not taken care, it is not doing operation.
Is my step to handle unexpected window correct.
If not correct, can you please guide me on how to handle the unexpected window and continue the script execution.
It would be great if it is explained by a sample code.
Note: I don't want to stop the execution.
Thanks in Advance,
Re: Handling Un-Expected window
You can find a possible solution here.