Forum Discussion
tristaanogre
Esteemed Contributor
If your application process name in Windows is myApp, then try the following:
function closeApplicationInstances(){ var currentProcess = Sys.WaitProcess('myApp', 2000); while (currentProcess.Exists){ currentProcess.Terminate() currentProcess = Sys.WaitProcess('myApp', 2000); } }
Marsha_R
6 years agoChampion Level 3
I wouldn't bother checking for 2 instances. At the top of your code, before you start the actual test, use tristaanogre's code and close everything, then open your one instance for testing.
Related Content
- 6 months agoCharzRj
- 4 years agoclaudiaborges