Exit script in the first failed step

Hi, does anyone know if it's possible to make UFT exit the test as soon as a step fails?

So, a simple if condition with Exittest and variations won't help as I can't create this if for each step of a script with 400 lines. This must be something in the setup of the test.


  • Verified Answer

    Can you define what mean by a step error? Normally of you are testing a GUI application and an unepxcted "something" occurs, the test will halt by itself.

    What you wish to do is a "clean exit"??

    Have you considered using something like a recovery scenario for this which will "trap" any error and will perform an ExitAction statement ..?

    Dont know if this is your direction but this is what I can come up with ...


  • Hi Liorde,

     Thank you for your support.

     I mean any kind of failure. Let's say for example an object is not found, UFT will report "Object not found in the screen ... ", but will keep going. What I want to is to exit the test at this moment.

     And you are right, I didn't know Recovery Scenario could cover this kind of situation, but I just found out that yes, it does.

    Thank you again.


    Kind regards,

    Renan Gaspar.