Forum Discussion

AnitaLeslie's avatar
AnitaLeslie
Occasional Contributor
2 years ago

How to close runtime error popup in testcomplete and continue execution

I am designing a script using python in testcomplete. During overnight executions of around 100TCs the execution stops due to runtime error popup in testcomplete. How to close this pop-up and continue the execution by failing the test case and moving to the next? 

Code example: 

try:

------

-----

except RuntimeError as e:
errorCode = e
Log.Error(str(e))
Log.Error("Runtime error has occured")  #custom message to be logged
return str(e)
finally:
#Close browser before moving to the next test case
close the browser

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I think it's best to understand why the "Runtime error has occurred" dialog is appearing, as opposed to dismissing it.

     

    What version of TestComplete are you using? And, were your scripts working fine previously before?