Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How To Stop Execution
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
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?
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
Use ExitTest instead of Exit Run.
Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago Smile 
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


Reply
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Perform some functions whenever QTP Stop button is pressed smartkarthi 2 3,213 08-22-2013, 11:43 AM
Last Post: smartkarthi
  How to stop Second Action Call faheem05 6 4,130 10-05-2012, 11:11 AM
Last Post: faheem05
  QTP doesn't stop after one iteration in ALM11 QTPNewbie 6 6,909 01-20-2012, 10:40 AM
Last Post: anil2u
  How to stop getting values from DataTable after the result passed? Uma 2 3,173 10-13-2011, 04:46 PM
Last Post: Uma
  how to force TEST to stop, rather than attempt to restart cocojava 4 4,984 07-06-2011, 09:39 AM
Last Post: rajpes

Forum Jump:


Users browsing this thread: 2 Guest(s)