Forum Discussion

hokrani's avatar
hokrani
Contributor
14 years ago

All type of error handling in one unit

I would like to create one unit which will have all kind of error handling functions (like unexpected window, on time out) and then i will use these unit in other script to handle error.



Please let me know how to do it.


  • No...



    I will elobrate more:



    I want to create one unit which will contain all kind error handling function (like recovery scenario in QTP).



    Then i wil go to implete for each test case say Test Case 1, Test Case 2 etc.( these are script  ).



    While implement each Test Case, i want to handle all kind error. Instead of writing once more error handling function i want to use unit which is defined at beginning.



    Please let me know how to do it



  • Hi,





    As far as I know, Recovery Scenario Manager in QuickTest Professional represents an event and exception handling mechanism. TestComplete does not have such a feature, but you can use the following approaches:





    1. Using the project settings of the Playback group and the OnUnexpectedWindow event handler, you can handle unexpected windows that can appear during the execution of your tests in the needed way. For more information, see the "Handling Unexpected Windows" help topic.





    2. As for handling exceptions in scripts, you can use the statements provided by the scripting languages to accomplish the task. Please refer to the "Handling Exceptions in Scripts" help topic for details.