When you are using an automated testing tool like AscentialTest, the tool is hooked into the main process of the application that you are testing. When you kill that process using TaskKill, AscentialTest doesn’t have an opportunity to unhook. So it is not good practice to use TaskKill to close the application. Instead you should have a ‘recovery system’ built into your test class. OnStart and OnFinish are the virtual methods in the base class that you should be providing in your test class. If the application is to be closed after the conclusion of each test, then OnFinish should be responsible for making sure that it is closed gracefully, including looking for popups that might come up when you try to close the application and handling them from the GUI as the user would.
Contact Our Team