Forum Discussion
MichaelMcFarlan
15 years agoContributor
Thanks, both of those look useful and I'm not actually sure which one I need, mostly because I haven't been able to get them to work.
What I'm trying to do: I'm trying to make it so that when my program produces an unexpected error message box it will simply close the message box. The message box is the default one windows always uses for errors and warnings and whatnot.
I've tried setting up event handlers for "OnTimeout" and "OnUnexpectedWindow" using the default function names and parameters. Inside of each of these all I have is a Log.Message("we got here!"). I have the projects options "Auto-wait, timeout" set to 30000 (30s) and I've waited at least that with nothing happening. The project settings for "On unexpected window" have the "Click on focused control", "Press Esc", "Press Enter", and "Send WM_CLOSE" checked. However, none of those appear to be happening as the message box still just sits there no matter how long I wait. The test complete icon that shows what the script is doing just says the project name and sub-project name without any indication of waiting for anything. If I manually close the message box testcomplete jumps right in where it left off/
If anyone has any idea what I'm doing wrong please let me know, or if you need any additional information. I'm going to go try doing some of this in a new test project and see if I can't get it to work any better.
What I'm trying to do: I'm trying to make it so that when my program produces an unexpected error message box it will simply close the message box. The message box is the default one windows always uses for errors and warnings and whatnot.
I've tried setting up event handlers for "OnTimeout" and "OnUnexpectedWindow" using the default function names and parameters. Inside of each of these all I have is a Log.Message("we got here!"). I have the projects options "Auto-wait, timeout" set to 30000 (30s) and I've waited at least that with nothing happening. The project settings for "On unexpected window" have the "Click on focused control", "Press Esc", "Press Enter", and "Send WM_CLOSE" checked. However, none of those appear to be happening as the message box still just sits there no matter how long I wait. The test complete icon that shows what the script is doing just says the project name and sub-project name without any indication of waiting for anything. If I manually close the message box testcomplete jumps right in where it left off/
If anyone has any idea what I'm doing wrong please let me know, or if you need any additional information. I'm going to go try doing some of this in a new test project and see if I can't get it to work any better.