Forum Discussion

sastowe's avatar
sastowe
Super Contributor
11 years ago
Solved

overlapping vs unexpected

What is the difference?
  • 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.

3 Replies

  • Overlapping window means that there is a window hiding the control you are trying to get to.

    Unexpected window means a new child window was created on top of your tested application. (error messages, pop ups, etc).



  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    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.