Forum Discussion

luisanillo's avatar
luisanillo
Occasional Contributor
6 years ago
Solved

Focus on window not visible on screen

Hello,

 

I'm testing an application (delphi) and every time I press F12, I get a new window which helps me navigate in the application (note that both the application and the window are part of the same process, which is why minimizing does not show the window). My issue is that when it is done enough times, the window appears behind the application. From what the devs told me, I have to change the window Z order to make it visible on screen.  

 

I have tried multiple things, but the object always says visible = true, while visibleOnScreen = false. Any idea how can I change the z order of application windows or even better, make my window visible again ?

9 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    windowObject.Activate where "windowObject" is your window you want to bring forward.

     

    See if that helps.

    • luisanillo's avatar
      luisanillo
      Occasional Contributor

      Sadly it does not, I have already tried Activate, SetFocus, Minimize/Maximise and no success.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Activate should work.. that is, essentially, the command that brings a window within an application forward.  

         

        So... setting aside my TestComplete hat and putting on my QA/Tester hat...

         

        Does it always happen at the same place?

        You say you use it to navigate.  What if you navigate to that place where it fails right away rather than several times through?  Does it "fail" then, too?

         

        See... my suspicious b*****d of a brain is wondering if this isn't a problem in your AUT where some form or other is set in such a way that it is ALWAYS in front, regardless of what else is happening.