Forum Discussion

sastowe's avatar
sastowe
Super Contributor
12 years ago

overlapping vs unexpected

What is the difference?
  • AlexKaras's avatar
    12 years ago
    Hi Stephanie,



    Overlapping means that the target window or control is overlapped by some other window or control but this overlapping window does not block original control from been accessed. I.e. it is possible, for example, to move overlapping window and set focus to the original target control.



    Unexpected window is a window that blocks access to the original target control. As a rule, unexpected windows have either modal or system modal flags set which means that it is not possible to set the focus to the original target control until the unexpected window is not closed.



    Note, that both OnOverlapping and OnUnexpected events occur only when your test code manipulates windows and/or controls in a 'user-like' way. I.e. when the test code uses .SetFocus, .Activate or .Keys methods to interact with windows/controls.

    If the test code gets/sets the value of the control via, for example, .wText or .SetText properties/methods, the OnOverlapping and OnUnexpected events do not trigger even if the target window is blocked by some modal message window.