Forum Discussion
Simple. You're not closing it properly.
How are you closing it? Many applications, if you just click the "x" in the top right, will just minimise to the tray.
So either exit the application properly (I don't know what "properly" is in your case as I don't have access to it), or kill it at process level after you have (incorrectly) closed/minimised it.
- tristaanogre10 years agoEsteemed Contributor
OR... you found a bug. If closing the x in the upper corner is SUPPOSED to close the application and end the process and it's not... well, then your automation is doing what it's supposed to do. If you're calling Sys.Process('myapp').Close(), that should also kill the process assuming that it's supposed to be able to be closed that way.
- mgroen210 years agoSuper Contributor
Could be a timing issue. Sometimes it takes a couple of seconds for an application to close all its processes/threads etc.
Maybe you are re-executing the testcase to fast after ending first test run? You could try to implement some wait time before each test run.. or, as tristaanogre mentioned you have found a bug in the application
- tristaanogre10 years agoEsteemed Contributor
mgroen2 wrote:
Could be a timing issue. Sometimes it takes a couple of seconds for an application to close all its processes/threads etc.
Maybe you are re-executing the testcase to fast after ending first test run? You could try to implement some wait time before each test run
Yup... Something that I've had to do in the past is, in whatever method I'm using for closing an application, adding a while loop like
while (Sys.WaitProcess('myapp', 500).Exists) { aqUtils.Delay(500); }Basically, this waits for the process to close before continuing... now, obviously, if the process NEVER closes, this will be an infinite loop and you'll get old and grey before you go any further so you might want to add some sort of break condition (like an iteration counter or something). But, to make sure that you are closing your application, something like this might be necessary.