Micro Focus QTP (UFT) Forums
How To Stop Execution - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How To Stop Execution (/Thread-How-To-Stop-Execution)



How To Stop Execution - Amit Singh Chauhan - 12-10-2010

Hi All ,

I need to stop my execution as soon as conditions is fullfilled. Tried this way:

Code:
If Condition = True then
  Msgbox "Execution will stop after this."
  Exit Run
End if

but whenever I write down Exit Run or even Exit Test there comes a syntax error saying invalid Exit statement. I tried to put this code in all the function files of my framework and even in actions but the result is same.

Can anyone help me out in this?


RE: How To Stop Execution - manishbhalshankar - 12-10-2010

Use ExitTest instead of Exit Run.


RE: How To Stop Execution - Shubhangi - 12-23-2010

You can use ExitAction also...if you want come back from particular Action Only...
-----------------------OR----------

ExitTestIteration if you want exit from current iteration and move to next iteration...

Hope this will help you....Smile





RE: How To Stop Execution - BVVPrasad - 12-23-2010

Looks like you are using space betweek 'Exit' and 'Test'. You should not use any space between them.

ExitTest can be used for this purpose.