How to manage Errors as not or Warnings with Testcomplete
Hi everyone in SmartBear Community,
Sorry for my aproximate poor, or roughly English. I hope you will understand me !
I have a simple Test Result question with an "WPF" application called "PI.UI.exe" made by my compagny.
I made some tests with this APP "PI.UI.exe".
This app depends on system environment and, sometimes, takes time to open or close.
So today I want to improve my tests to get more informations about application launching and closing.
I made these 2 python scripts which are detecting some expected objects :
START
import time
if Aliases.PI_UI.FrmPIMenu.Exists:
Aliases.PI_UI.FrmPIMenu.Focus()
else:
Log.Message("Slowddown detected with application launch, waiting 5 seconds")
time.sleep(5)
CLOSE
if not Sys.Process("PI.UI").Exists:
Log.Message("Application closed correctly")
else :
Log.Message("Application is still open. Waiting 5 seconds before Kill process")
time.sleep(5)
Sys.Process("PI.UI").Terminate()
It works well, but in normal case it return a Red Error in the log because Process PI.UI is not found.
I would like to manage and bypass this Error.
What I want is that TestComplete ignore this control and make the test Results GREEN instead of RED.
Do you me know if it's possible ?
This will make my robots happy
:robothappy:
Regards !
Niko...