Forum Discussion
tristaanogre
7 years agoEsteemed 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_R7 years agoModerator
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
- 4 years ago
- 10 months ago
Recent Discussions
- 2 days ago