Can not hook Window.Open Popups

Last post 07-22-2009 10:19 PM by farmas. 2 replies.

Sort Posts:

  • Can not hook Window.Open Popups

    07-21-2009, 12:28 PM
    • Member
      6 point Member
    • AikiBushi
    • Member since 07-15-2009, 7:17 PM
    • Posts 9

      I am writing automation for an app that uses lots of popups. Each of these poups are launched via javascript window.open(). However, I can not seem to hook them (using HtmlPage popup = parent.GetPopupPage(1))

     

    any idea how to work around this?

    Thanks.

     

  • Re: Can not hook Window.Open Popups

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

    I found the problem. Just an FYI if anyone else comes across this issue:

    The app I am testing starts at a launchpage that automatically launches the webapp into a popup (to remove all toolbars, buttons and address bars) on the onload of the body tag. If I close this popup and use the framework to relaunch the app I can successfully hook the popup. So it seems all popups have to be triggered by the test framework.

     

     

  • Re: Can not hook Window.Open Popups

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

    Yes, LTAF needs to hook into the window.open of the test page, and this happens whenever a command is received by the driver frame. If you navigate to a page that automatically popups a new page, LTAF doesn't get a chance to capture it.

    BTW, there is a known issue in the current version that if a test fails while automating a popup window, the DOM that is reported in the error page is from the main window instead. We are looking at addressing that in the next release.

    - Federico

Page 1 of 1 (3 items)