Forum Discussion
Morgan,
TestComplete treats a window as unexpected if this window prevents the test engine from simulating user actions, and if this window didn't appear during the test creation.
If your application's error window is not modal, then it does not block user input into other application windows and panels, so TestComplete does not consider this window as unexpected.
Another possible cause is that your test does not contain operations that simulate user actions on the tested application after the error window appears (for instance, the code snippet you posted here does not include any test command that simulates user activity). Since there are no user actions, TestComplete cannot consider a window as unexpected.
Also, please check whether your project has an OnUnexpectedWindow event handler. The handler's code can contain statements that prevent posting an error message to the log.