Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
exit from code
#1
Solved: 10 Years, 9 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: 10 Years, 9 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: 10 Years, 9 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,063 02-02-2014, 03:39 PM
Last Post: EGBELL
  exit parent functions as well Shridevi.Salagare 3 3,596 07-31-2013, 12:15 AM
Last Post: Ankur
  How to exit from a for loop silpavinod 2 9,369 10-17-2012, 12:55 AM
Last Post: agarwl.anurag
  Need to exit hte execution of the script... manishnangalia 3 3,234 07-18-2012, 07:02 PM
Last Post: sshukla12
  QTP Test results will return exit codes asrivastava 13 16,222 07-08-2011, 12:57 PM
Last Post: rajpes

Forum Jump:


Users browsing this thread: 1 Guest(s)