Occurs when an overlapping window appears.
The event occurs when your script tries to simulate a mouse click over a window or control, but that window or control is overlapped by another window or control so that the click cannot be executed. If the Ignore overlapping window option in the Playback settings of your project dialog is enabled, TestComplete ignores the overlapping window and continues the script run. If this option is off, the script execution is halted. Write an
OnOverlappingWindow event handler to perform desired actions if an overlapping window appears. For instance, you can post an image of the overlapping window to the log or stop the script if an “unknown” overlapping window appears.
OnOverlappingWindowevent handler simulates a mouse click, TestComplete will check for an overlapping window and if the click is performed over the overlapped window, the event handling routine will be called recursively. To avoid recursion, do not simulate mouse clicks or keypresses over the overlapped window within this event handler.
OnOverlappingWindowevent does not work for windowless objects. That is, if the target window or control is overlapped by a windowless object (for example, a modal object implemented in a web application with a
divelement) the event does not occur. For more information, see Handling Unexpected Windows.
The event has the following parameters:
The Event control that processes the event.
OnscreenObject object (window or control) to which a mouse click or a keypress is addressed.
OnscreenObject object that overlaps the Window.
Properties of the
LogParams object hold text, priority, color and other attributes of the error message posted to the log. The
Locked property of this object is meaningful only if the Ignore overlapping window project option is disabled. It lets you specify whether TestComplete should cancel further processing of the overlapping window. Setting
Locked to True will tell TestComplete to ignore the overlapping window. If the option is on, TestComplete will always ignore this window regardless of the
For information on how to create an event handler for this and other TestComplete events, see Handling Events.