Get the active window?

Last post 08-09-2009 10:17 PM by farmas. 3 replies.

Sort Posts:

  • Get the active window?

    07-22-2009, 2:35 PM
    • Member
      6 point Member
    • AikiBushi
    • Member since 07-15-2009, 7:17 PM
    • Posts 9

      The application that I am automating spawns several popups, sometimes more than once at a time, and not always in the expected order. Is there a way to get the (HtmlPage) popup? This would help tremendously if possible.

     

    Thanks

  • Re: Get the active window?

    07-22-2009, 10:23 PM
    • Participant
      1,114 point Participant
    • farmas
    • Member since 08-05-2002, 8:19 AM
    • Redmond, WA
    • Posts 249
    • AspNetTeam

    Would it help to find the popup page by its caption? Something like

    HtmlPage popup = currentPage.GetPopupPage("caption");

    - Federico

  • Re: Get the active window?

    07-24-2009, 8:57 AM
    • Member
      6 point Member
    • AikiBushi
    • Member since 07-15-2009, 7:17 PM
    • Posts 9

     That would help. I can think of several other situations where I could use that.

    However, it would still require that I know which window will have focus. If a message is fired off from the system I could have a popup on the screen that I am unaware of. What I really need is a getactivewindow() that I can call after a postback to determine if the system message has arrived. I tried doing this through the API but that will only return the window handle, which does not seem to translate into an HtmlPage.

    Any other ideas?

  • Re: Get the active window?

    08-09-2009, 10:17 PM
    • Participant
      1,114 point Participant
    • farmas
    • Member since 08-05-2002, 8:19 AM
    • Redmond, WA
    • Posts 249
    • AspNetTeam

    I see, so you are after a method that returns you the window that is in the foreground? I don't know how to do this, all the logic to find the window to act upon is in our javascript driver... I am not sure how to do this. :(

    However, getting the window by caption should be doable, and I'll get this in for the next release.

    - Federico

Page 1 of 1 (4 items)