Forum Discussion

TRoper's avatar
TRoper
Occasional Contributor
14 years ago

Continue script after an error

Hi,



I would like to find a way to continue a script after an error.  Here is the code I have in my script.  The script stops when the return value is 7.  How can I set the stop on error flag to continue?



Dim Value, strMessage

  Value = MsgBox ("Was Observation Panel Correct?", 3, "Observation")

  If Value = 7 Then

    strMessage =Inputbox("What is wrong with the Observation Panel","Observation Panel")

    Log.Error strMessage

  Else

    Log.Message "Observation Panel passed"

  End If



Thank You

Steve

2 Replies


  • Hi Steve,





    If you don't want to stop the test execution on error, you can disable the 'Stop on error' project option. In this case, the test execution will be continued. For more information, please see the 'Project Properties - Playback Options' article.





    If you organize your tests into Test Items, you need to set the 'Stop on error' option for all test items to 'None'. For additional information, please see the 'Stopping Tests on Errors and Exceptions' help topic. Please note that this option has effect only if the 'Stop on error' project option is disabled.





    I hope this helps.