pop-up window cannot be closed

6 posts, 1 answers
  1. Doga Ercan
    Doga Ercan avatar
    21 posts
    Member since:
    Jul 2011

    Posted 30 Nov 2011 Link to this post

    Hi,

    I have upgraded Test Studio from 928 to 1117. I have a test scenario with a pop-up window, it worked fine with previous versions but now it can open pop-up window, click on a button there but while trying to close it it gives an error:

    InnerException:
    System.ArgumentException: Cannot find Browser host with Url: '/payment/PostFinancePayConf.ashx?'.
    Attempted to close Browser: 'https://dev-en.office.comparis.intra/payment/YellowPayEmuNew.aspx
       at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.HtmlDialogHandlerDescriptor.Execute(Browser browser)
       at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)

    I tried it with Firefox, IE, Chrome and Safari and got the same error.
    It worked fine before the upgrade.

    Thanks

    Ercan
  2. Doga Ercan
    Doga Ercan avatar
    21 posts
    Member since:
    Jul 2011

    Posted 05 Dec 2011 Link to this post

    Hi again,

    Could you please inform me whether it is a known issue or just I faced with it?

    Thanks

    Ercan
  3. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 05 Dec 2011 Link to this post

    Hi Doga Ercan,

    No, this is not a known issue. Have you checked the PopupUrl property for the Close pop-up window step? If that URL is has a dynamic or has changed, you can set IsUrlPartial to True and trim the PopupUrl field (as outlined at the bottom of this HTML Popup page. Is the pop-up HTML or Modal?

    If the issue persists, we'd like to see it first-hand. Is your test against a publicly accessible site? If so, please attach a copy of the test files (within a .zip file) to a support ticket, which unlike this thread is confidential.

    If not, do you know of a public site that demonstrates the same behavior? If not, the next best option is to provide us with the Step Failure Details by using the Export Result to File feature. 

    Kind regards,
    Anthony
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  4. Doga Ercan
    Doga Ercan avatar
    21 posts
    Member since:
    Jul 2011

    Posted 06 Dec 2011 Link to this post

    Hi Anthony,

    Thanks for your attention. My test is not against a publicly accessible site. 

    I investigated issue in more detail and realize that problematic scenario is like following. (I found an example on publicly accessible site)

    1- go to page: http://rip747.github.com/popupwindow/
    2- click on: Default settings: Example 1
    3- click on Blog in the new popup window - url of popup window has changed
    4- close popup window

    and this time i get similar error as well.

    *******************
    Cannot find Browser host with Url: 'http://rip747.wordpress.com/'.
    Attempted to close Browser: 'http://rip747.github.com/
    InnerException:
    System.ArgumentException: Cannot find Browser host with Url: 'http://rip747.wordpress.com/'.
    Attempted to close Browser: 'http://rip747.github.com/
       at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.HtmlDialogHandlerDescriptor.Execute(Browser browser)
       at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
    *********************

    I tried both checking and unchecking IsModalPopup. IsUrlPartial is always checked with static URL (http://rip747.github.com/ in open popup step,  http://rip747.wordpress.com/ in close popup step)

    To sum up, scenario works fine if it opens a popup and then close it. But if you click on a link on popup and URL of popup has changed, then it cannot find popup window to close. As I said above, i tried IsUrlPartial and IsModalPopup checkboxes as well. My scenario works without any problem before the upgrade (1117).

    Thanks 

    Ercan


  5. Answer
    Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 06 Dec 2011 Link to this post

    Hi Doga Ercan,

    Thank you for the sample site. I was able to replicate the behavior described and confirm the bug. I filed a report for it. You can find the PITS Issue here: Public URL.

    Here's a work-around that worked for me in the meantime:

    Just before the Close pop-up window step, add a Verification or Wait on an element that exists on the second page of the pop-up after the link is clicked. In your example, I simply verified the text content of the "Rip's Domain" link at the top of the page.

    Also be aware of another crucial change in your example: the IsUrlPartial property of the Connect to pop-up window step must be set to False. If not, it will make a partial match on the URL of the parent window and search for the MyBlogLink there.

    Best wishes,
    Anthony
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Doga Ercan
    Doga Ercan avatar
    21 posts
    Member since:
    Jul 2011

    Posted 07 Dec 2011 Link to this post

    Hi Anthony,

    Thanks for your attention and quick response. Proposed workaround worked fine.

    Best Regards,

    Ercan
Back to Top