This is a migrated thread and some comments may be shown as answers.

Connect to HTML popup loads pdf file

2 Answers 32 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Romio
Top achievements
Rank 1
Romio asked on 03 Nov 2013, 12:15 PM
Good day,

While am recording a test case, one of the steps is to connect to HTML popup loads pdf file so,,
**Record for connecting to the popup will be registered.
And when close the popup, so
**Record for closing the popup will be registered.
And when run the testcase then the step connecting to the HTML dialog will fail.
Please note that am adding wait and delay until the dialog open.

System.OperationCanceledException: Exception occurred waiting for the new browser to connect. ---> System.TimeoutException: Wait for condition has timed out at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target) at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType) at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout) at ArtOfTest.WebAii.Core.Manager.WaitForNewBrowserConnect(String url, Boolean isPartial, Int32 timeout) --- End of inner exception stack trace -- --


Below is the Codded step:
Manager.WaitForNewBrowserConnect(https://ev.be.rshos.net/portll/report/reportShow.do?mode=show&reportId=22&module=Licene, true, 5000);



Regards,
Romio

 

2 Answers, 1 is accepted

Sort by
0
Daniel
Top achievements
Rank 2
answered on 04 Nov 2013, 01:27 PM
Few questions:

Manager.WaitForNewBrowserConnect(https://ev.be.rshos.net/portll/report/reportShow.do?mode=show&reportId=22&module=Licene, true, 5000);

You are specifying that the URL is a partial URL, is that true?  Is 5 seconds long enough for the popup to load?

Also, if it is a partial URL, do you need the entire string out to "Licene" (is this spelled correctly?), or can you shorten it to say just to https://ev.be.rshos.net/portll/report//reportShow.do?mode=show& or something along those lines?
0
Ivaylo
Telerik team
answered on 07 Nov 2013, 09:23 AM
Hello Romio,

Thank you for contacting Telerik Support.

The error message you provided is most likely the result of a popup loading with a URL that contains a dynamic portion, such as a unique search query or transaction number. In order to successfully connect to such a popup, you will need to alter the PopupUrl value in the Connect to pop-up step properties. 
Why you are using a coded step in first place, since this can be easily automated with a standard step? This is an article you can take a look on how to deal with HTML Pop-ups.
If you insist using a coded step in your test please take a look at this link for more information on handling HTML Pop-ups via code.
The best way to shorten the URL and use a partial one is to set this as a partial URL:

https://ev.be.rshos.net/portll/report

If you still experiencing difficulties we will need access to your application or at least fiddler trace which reproduces the issue in order to assist you further.

Regards,
Ivaylo
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Romio
Top achievements
Rank 1
Answers by
Daniel
Top achievements
Rank 2
Ivaylo
Telerik team
Share this question
or