Forum Discussion
AlexKaras
12 years agoCommunity Hero
Hi Jessie,
OnUnexpectedWindow event has no specifics as for the tested application. This event is triggered when your test code tries to execute some UI-related action over some window and the access to this window is blocked by another (usually - modal) window.
The mentioned UI-related actions are: .Click(), .Activate(), .Keys() and the like.
For example, the OnUnexpectedWindow event will be triggered if the test code tries to click some window and this window is overlapped by the Open File system dialog.
At the same time, this event will not be triggered if test code reads .Caption property of the same window. The event will not be triggered because test code in this case just reads some property but not tries to put the window in the foreground.
So, in your case, you need to:
a) Examine if the unexpected object is a window or just some web UI element that looks like a window (e.g. DIV element);
b) Examine if the unexpected window is a modal one, i.e. does it block an access to the underlying window;
c) Check if your test code tries to perform an action over the underlying window that (action) requires the window to be put in the foreground.
OnUnexpectedWindow event must be triggered only if the positive answer is given to all three points above.
OnUnexpectedWindow event has no specifics as for the tested application. This event is triggered when your test code tries to execute some UI-related action over some window and the access to this window is blocked by another (usually - modal) window.
The mentioned UI-related actions are: .Click(), .Activate(), .Keys() and the like.
For example, the OnUnexpectedWindow event will be triggered if the test code tries to click some window and this window is overlapped by the Open File system dialog.
At the same time, this event will not be triggered if test code reads .Caption property of the same window. The event will not be triggered because test code in this case just reads some property but not tries to put the window in the foreground.
So, in your case, you need to:
a) Examine if the unexpected object is a window or just some web UI element that looks like a window (e.g. DIV element);
b) Examine if the unexpected window is a modal one, i.e. does it block an access to the underlying window;
c) Check if your test code tries to perform an action over the underlying window that (action) requires the window to be put in the foreground.
OnUnexpectedWindow event must be triggered only if the positive answer is given to all three points above.