rushikesh
8 years agoContributor
How to avoid error in log when code to check process.Exists is executed.
Hi,
I am running below code
function KillProcess(App)
{
// Checks whether the process is closed
if (Sys.Process(App).Exists)
// Terminates the process
{
process.Terminate();
}
}
below is function used to run.
function TestKillProcess()
{
KillProcess("KillDlg")
}
Problem i am facing is that when KillDlg.exe is not running it logs error in log file saying KillDlg.exe was not found.
I want Test Complete to kill KillDlg.exe when it is present, otherwise do nothing, not even log error in log file.
If logs Message then no problem but don't want error.
Any help is appreciated.
Regards,
Rushikesh Kadam.