Connect to New Browser, Variable in URL

2 posts, 1 answers
  1. Sakura
    Sakura avatar
    1 posts
    Member since:
    Aug 2018

    Posted 09 Aug Link to this post

    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

  2. Answer
    Vera
    Admin
    Vera avatar
    0 posts

    Posted 14 Aug Link to this post

    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!
Back to Top