Originally posted by zwergnaeschen on July 17, 2025
Hi all,
We use TestComplete 15 to perform regression testing on our Delphi desktop application. We have a simple test:
open the application
short wait follows
close the application
Testcomplete will fail the test stating the “TestApp.exe” process crashed and test execution is interrupted.
Closing the application via X or through the ‘Main Menu - Exit’ results in the same error. The Sys.WaitProcess method also didn’t help. We have also attempted to close it using the .Close() method.
Maybe I’m placing the Sys.WaitProcess method in the wrong spot. I would be very grateful for a code snippet (JavaScript) and any help.
Maybe your application hasn’t finished loading when you attempt to close it? Can you add another Wait method to confirm the application has finished loading? For instance, we use a WaitWindow to detect that our start window has opened. Other options might be a WaitProperty to verify the application window is enabled, or WaitProperty for a toolbar button to become enabled.
It seems like a timing issue could be the culprit. Just because WaitProcess determines the EXE is running doesn’t mean the app is ready for interaction via automation or the user interface.