Forum Discussion

OlgaB's avatar
OlgaB
Occasional Contributor
10 years ago

Temporarily override the “Stop on error” option

Can I temporarily override the “Stop on error” option in script in TestComplete?

Sometime I need to check if one of two checkpoints is passed. I would create If_then statement and stop execution only if both checkpoints are failed.

4 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor
    Yes you can.

    Please go to your project /advance/Events - genaral events enable /OnlogError

    It will ask to create a script or keyword test.

    In that function you may handle error as you like. further detail could be reffered at support URL
  • tpotter's avatar
    tpotter
    Occasional Contributor


    I'm not sure if I totally understood this and the answer above solves it... But, you can right click your project then go to Edit | Properties, naviagate to playback and uncheck "Stop on error". 



     



    Then if you want to stop your script in an if else, you can use Runner.halt().



     



    Hopes this helps!


  • OlgaB's avatar
    OlgaB
    Occasional Contributor
    I'll try that event function. Thank you.
  • You can add logic into the OnLogError event so that a verification failure will not stop the test but an action failure will.



    A user explains how to in this post.