Forum Discussion

HCTestCenter's avatar
HCTestCenter
New Contributor
5 years ago
Solved

Problems with overlapping window

Hello,

 

Environment: Windows 10, Java 7, TestComplete 14

 

I am testing a Java application where it is possible for a window to open several times in the same place. They then overlap.

If I want to perform an OnScreen action, it can happen that the action is executed on the hidden window.
This leads to errors when executing the script.

 

How do I make it possible that I get a window into the status "VisibleOnScreen" == True before?

 

Window.Activate() does not work with views within a Java window.

 

As a normal user you would first move the top window to get to the one below.

 

Regards,

Mario

 

  • LinoTadros's avatar
    LinoTadros
    5 years ago

    Implement the "OnOverlappingWindow" Event and move the window in the way to the right or left by 50 pixel repeatedly until the Objects on your desired window is visible on the screen.

     

    Cheers

    -Lino

2 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    If that's what a "normal user" would do.... then that's what you code to do.  You will need to use a "drag" method, minimize, or something like that to move and remove windows.

    • LinoTadros's avatar
      LinoTadros
      Community Hero

      Implement the "OnOverlappingWindow" Event and move the window in the way to the right or left by 50 pixel repeatedly until the Objects on your desired window is visible on the screen.

       

      Cheers

      -Lino