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
5 Answers, 1 is accepted
Could you please inform me whether it is a known issue or just I faced with it?
Thanks
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.
Anthony
the Telerik team
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
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.
Anthony
the Telerik team
Thanks for your attention and quick response. Proposed workaround worked fine.
Best Regards,
Ercan