Forum Discussion
khoffman90
12 years agoContributor
Thanks for the message back.
The script itself is not a test.
In order for the tests to work correctly I must ensure that there is only one version of the application running at a time. This script basically finds out if the application is already running and if it does firstly try to close it nicely and then after a period of time terminate the application.
I do this by finding out if the application exists in the system. Process as suggested in a different thread however most of the time it does not exist and therefor the test fails.
i.e
var p = Sys.Process("program");
if(p.Exists){
p.Close();
}
I get process not found.
I have tried several different ways of doing the above. I did also try using the try/catch methods as you suggested however may not have done so correctly as it still logged an error. I will try this again tommorrow morning.
Thank again
The script itself is not a test.
In order for the tests to work correctly I must ensure that there is only one version of the application running at a time. This script basically finds out if the application is already running and if it does firstly try to close it nicely and then after a period of time terminate the application.
I do this by finding out if the application exists in the system. Process as suggested in a different thread however most of the time it does not exist and therefor the test fails.
i.e
var p = Sys.Process("program");
if(p.Exists){
p.Close();
}
I get process not found.
I have tried several different ways of doing the above. I did also try using the try/catch methods as you suggested however may not have done so correctly as it still logged an error. I will try this again tommorrow morning.
Thank again
Related Content
- 6 months ago
- 6 years ago