Forum Discussion

yaacovk's avatar
yaacovk
Contributor
9 years ago

How to use TRY CATCH in keyword test

In the keyword test, I used some script routines.

At a specific step, an unexpected error in the tested application can appear.

To identify the error, a script routine ("identifying error" in attached document) check if any popup error appears in tested application.

I want to use TRY CATCH statements in keyword test to identify if a popup error occured during the test. 

In case that error occured, some configurations are needed to reset the tested application (detailled in script routine "handling error" in attached document); I want also to run again the keyword test.

If I use "throw" instruction in script routine "identifying error", jscript runtime error will appear : Exception thrown and not caught.

Since that TRY CATCH statements in keyword test only handle exceptions raised by the test engine, is it possible to add popup errors to exceptions handled by TRY CATCH?

Thanks

No RepliesBe the first to reply