Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
exit from code
#1
Solved: 11 Years, 4 Months ago
Hi,
i don't understand how exit from code.. I have written an if-condition and i want exit from script if it is realized. On the main user guide I have found only something about exitaction, while in internet about "WScript.Quit", but it doesn't function because i have not defined any object WScript... and i wouldn't create it only to exit..
also something similar to "GoTo line x" would be right for me.
Any suggestion?

thanks a lot
Reply
#2
Solved: 11 Years, 4 Months ago
Hi,
These are the predifined exit statements in QTP.

Exit Do
Exit For
Exit Function
Exit Property
Exit Sub
ExitAction
ExitActionIteration
Object.ExitCode
ExitTest
Exititeration


Depending on you criteria You can us the above things.May be you can use Exittest or exitaction or exititeration.

Regards
Sridhar
Reply
#3
Solved: 11 Years, 4 Months ago
ExitTest is perfect :-)
thanks a lot
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Close on Exit Issue in QTP 11.0 EGBELL 1 3,199 02-02-2014, 03:39 PM
Last Post: EGBELL
  exit parent functions as well Shridevi.Salagare 3 3,857 07-31-2013, 12:15 AM
Last Post: Ankur
  How to exit from a for loop silpavinod 2 9,881 10-17-2012, 12:55 AM
Last Post: agarwl.anurag
  Need to exit hte execution of the script... manishnangalia 3 3,403 07-18-2012, 07:02 PM
Last Post: sshukla12
  QTP Test results will return exit codes asrivastava 13 17,028 07-08-2011, 12:57 PM
Last Post: rajpes

Forum Jump:


Users browsing this thread: 3 Guest(s)