Event handler doesn't triggered when my unexpected window appears
I'm struggling for a while with my issue, looking for some solution in former discussions.
In my test project sometimes a kind of unexpected window appears during test run.
In some cases it's easy to handle the situation by adding some extra lines to the scripts, which checks for the existance of that window. I mean, i have this window mapped in TesComplete Namemapping, and checking the .Exists() property, and do the necessary steps.
But it's not so effective, having this high amount of mostly unnecessary waste of time.
I tried to set up an event handler, followed the steps, described in manual for OnUnexpectedWindow event. I added a script, which should handle the event.
But, what i see, testcomplete never calls this event handler, only exits with error attached in the picture.
Is there any reason of this, or is there any additional parameter setting which i may have missed?
Thank you all in advance,
I didn't attach eventhandler code, because testcomplete never hit the eventhandler script.
The attached error message shows the point, when testcomplete should call the eventhandler, but for me it seems like, the engine doesn't recognise it's an unexpected window event, only that the tested window is disabled.
Additionally i followed the setting steps of event handling described like in the related section on this page: https://support.smartbear.com/articles/testcomplete/handling-unexpected-windows/