Results 1 to 3 of 3
  1. #1

    Exit from Sub or Function Help

    How can i terminate the program in the following situation?


    Sub mySub()
    call myFunction()
    End Sub

    Function myFunction()
    if true then
    'i want to terminate the program right here
    end if
    End Function


  2. #2
    Join Date
    Jan 2007
    Pittsburgh, PA

    Re: Exit from Sub or Function Help

    Look at QTP online help for keyword Exit statement

  3. #3

    Re: Exit from Sub or Function Help

    If by terminating the program you mean immediately stopping the QTP test run, then the regular exist statement (exit function / exit sub) won't help.

    You need the either the ExitAction / ExitActionIteration / ExitRun / ExitTest / ExitActionIteration. Look in the QTP help regarding the different commands.
    'coz we're programmers - not users



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 07:43 PM.

Copyright BetaSoft Inc.