Handling Dynamic URLs in Popups

6 posts, 0 answers
  1. ME
    ME avatar
    13 posts
    Member since:
    Dec 2010

    Posted 04 Jan 2011 Link to this post

    How should one handle a web page that is considered by Telerik as a popup when the URL is unique to each record in the application.
    The command below was copied from a step that I converted to be a coded step (in order to be able to show the entire string)
    In the case below, the dynamic part will be the PV=63 - in this particular case, the record ID is 63 but it will surely be applied to a different record ID when the test will be invoked!

    Can one resort to regular expressions in this case?
    If so, how is this done?

    Connect to pop-up window :
    'http://someapplication.com/default.asp?RT=VXP&SOMEREF=0&SOMEVAL=GENERATE_CORRES_JOB&PV=63&THEPAGE=ZOOMER'

    Thanks.

    Bey
  2. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 10 Jan 2011 Link to this post

    Hi Bey,

    I am sorry for the delay getting back to you on this. I wanted to do some serious homework before responding so I can give you the best assistance possible.

    First a short answer: No you cannot use regular expressions in the URL of Connect to Popup steps. it only accepts exact or partial string matches. A partial match means it will look for the "PopupUrl" string as shown in the test step properties anywhere within the URL of the popup window.

    I do agree we do not gracefully handle popups with dynamic URL's in them. I have logged feature request 104570 to track this.

    Currently the best we can do is to ask you to manually modify the PopupUrl property after each and every recording. You should be able to just strip the query string completely from this test step property and you test will then execute just fine. I have attached a couple of screen shots as examples of the URL before strings and the after the URL has been stripped.

    If your tests do not pass after manually modifying them in this manner, please describe where & how they are failing and I'll assist you in overcoming whatever that hurdle is.

    Greetings,
    Cody
    the Telerik team
    Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
  3. Mithun
    Mithun avatar
    10 posts
    Member since:
    Mar 2011

    Posted 06 Jun 2011 Link to this post

    Hello Support!
    What about this issue in new test studio? Can I really use regular expression or query string variable values from excel?
  4. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 09 Jun 2011 Link to this post

    Hello Mithun,
           this feature hasn't been implemented yet. You can track the feature request in your PITS system here:
    http://www.telerik.com/support/pits.aspx#/public/test-studio/6440
    PITS has a voting system which we use to determine the priority for a given bug/feature request.

    Greetings,
    Stoich
    the Telerik team
    Do you think you know all the new features coming out in Test Studio R1 2011? Think again - we have some surprises and will share them with you in the What's New in Test Studio R1 2011 Webinar on May 12th.
    Register Today!
  5. Lucas
    Lucas avatar
    6 posts
    Member since:
    Jul 2019

    Posted 17 Jul in reply to Cody Link to this post

    I am facing the same situation and can't figure out how to make this work, I have tried several variations.  Here is the URL:  http://10.10.0.148:888/eRep/quotes/PrintReport/5795/DealerQuoteTemplate

    The "5795" is the portion that changes, what would be the correct format to change the url to?

  6. Elena
    Admin
    Elena avatar
    1155 posts

    Posted 29 Jul Link to this post

    Hi Lucas,

    Please, excuse us for the delayed response. 

    As far as I understand the application under test has popups with partially dynamic URLs and you need to decide how to data drive these. In case I have misread your query, please do not hesitate to elaborate further on the topic. 

    However, if I am correct, you will need to consider how that parameter "5795" gets available - is it generated during the test run, or it is predefined and know before the test starts. In the second situation, my suggestion is to prepare the data source with the predefined value and pass it to the 'Connect to popup' step URL

    On the other hand, if that parameter gets generated during the test run, you should go for a coded approach to build the desired URL. Here are some details for this option: 
    1. You can create a step to extract the generated value, which will be needed for the URL.
    2. You can then use the extracted variable in code in order to build the new URL. 
    3. In a coded step you can use the extracted value to modify the URL (you can use the standard string handling methods in C#). 

    I hope this information will be helpful for you. Of course, if you have further questions or doubts, please do not hesitate to get back to us. 

    Thanks for your cooperation. 

    Regards,
    Elena
    Progress Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
Back to Top