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

Connect to New Browser, Variable in URL

1 Answer 25 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sakura
Top achievements
Rank 1
Sakura asked on 09 Aug 2018, 08:49 PM

Hi there, 

I have tests that execute and connect to a new browser popup. 

Usually this works fine, I have one where the browser URL is variable and unpredictable:

Https://foo.com/x/y/z_2/moreUrlStuffHereICanPredict
Https://foo.com/x/y/z_3/moreUrlStuffHereICanPredict
Https://foo.com/x/y/z_4/moreUrlStuffHereICanPredict

etc. 

 

I am using Relative Only so usually this look like x/y/z_2/moreUrlStuffHereICanPredict, etc.

I can predict everything before the 2,3,4 and everything after. My application sets that number each time you run a query which throws a popup window.

Is there a way to make this work in the UI test step "Connect to Popup"?

Alternatively, I could check via script if the popup exists, then connect... is there a function such as Manager.Browser.Exists(URL)?

I've been looking int he forums and in the online help, nothing seems to cover this case.

 

Thanks!

Sakura

Win10

IE

Test Studio 2017.1.207.0

1 Answer, 1 is accepted

Sort by
0
Accepted
Vera
Telerik team
answered on 14 Aug 2018, 03:27 PM
Hello Sakura,

Thank you for contacting Telerik Support.

Yes, there is a way to handle a dynamic URL for pop-up window. I advise you to check out How to Deal with Variable Query Strings in URLs and more specific to enable `IsUrlPartial` option which indicates whether to use a partial matching to match the pop-up url as described in the bottom of the article.

Going further if I understand correctly I would like to let you know that you can use `PopupWaitTimeout` option which sets the time to wait for the pop-up to show up (msec). 

In addition I would like to mention that it is best for you to update to the latest version of Test Studio which is R2 2018 (v. 2018.2.606) since the latest features and updates will be available for you. 

I hope this information is useful.

Please, let me know if there is anything unclear or if you need any further assistance.

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