TC report an error " Unexpected window: '' " for one normal subobject.
Like the pic, it report an error for unexpected window, but it don't trigger my events llike last unexpected window,
And the unpxected point to "
" that belongs to my tested app. But If last waring unexpected window don't appear, the error unexpected window won't appear.
So my question how to handle the second error unexpected window?
And it's my events:
Sub GeneralEvents_OnUnexpectedWindow(Sender, Window, LogParams)
Call Log.Picture(Window, "Screen image", "This image was added to TestLog from the GeneralEvents_OnUnexpectedWindow procedure")
Log.Warning "Unexpected Window",, pmNormal
If Window.WndClass = "#32770" Then
If Window.waitWindow("Button","&Yes",,5000).Exists Then Window.waitWindow("Button","&Yes",,5000).Click
If Window.waitWindow("Button","&OK",,5000).Exists Then Window.waitWindow("Button","&OK",,5000).Click
Solved! Go to Solution.
While it is good to know that you've solved the problem, I would pay attention to the 'The action may be performed incorrectly...' warning and improve test code to handle this properly.
As a note: OnUnexpectedWindow event is triggered when test code tries to activate some window but fails to do this because the window cannot be activated (i.e. put in front of user) due to be overlapped by another application- or system-modal window.
/Alex [Community Champion]
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
Thanks, the issue still exists in my project. But for your information, I know how to trigger the unexpected window. Maybe tested App has conflict with Testcomplete. I will work on it to solve.