I use a script triggered by the OnStartTest to check the status of tested apps and close or kill processes and start apps as needed. Maybe a built in function would be good? There are also a lot of articles about how to deal with modal dialogs. Drop me a message if you want to know more. 😎
- KRogersX6 months agoContributor
Thanks, Scot.
I do have a version of this that looks for all specified dialogs and attempts to manually close them. This works, but is quite slow on the .Exists check if the dialog doesn't currently exist. Also, I have no way currently to watch for system dialogs and close them.
My hope with this feature request is that SmartBear could integrate something into TestComplete that would be faster and more robust than anything I could cobble together in a script.- rraghvani6 months ago
Champion Level 3
If it's slow, then either adjust your Project Properties -> Playback settings, auto-wait timeout
Or use WaitNNN methods.
Not sure why you are getting "other app-owned windows" interfering with your main application testing?
- KRogersX6 months agoContributor
Thanks, but that's missing the point. TestComplete should already know what dialogs are currently existing in the Objects tree, so it could just find those and close them all. Then I don't ever have to do a slow .Exists check for each dialog.
"Not sure why you are getting "other app-owned windows" interfering with your main application testing?"
I never said that. I'm talking about modal dialogs belonging to the application, or system dialogs (e.g. message boxes) opened by the application.
- scot19676 months ago
Champion Level 3
I use if(Sys.WaitProcess(appProcessName,1000).Exists) this lets me specify how long to wait.