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

Handling Dynamic URLs in Popups

5 Answers 101 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ME
Top achievements
Rank 1
ME asked on 04 Jan 2011, 10:25 PM
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

5 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 10 Jan 2011, 07:04 PM
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
0
Mithun
Top achievements
Rank 1
answered on 06 Jun 2011, 02:21 PM
Hello Support!
What about this issue in new test studio? Can I really use regular expression or query string variable values from excel?
0
Stoich
Telerik team
answered on 09 Jun 2011, 12:18 PM
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!
0
Lucas
Top achievements
Rank 1
answered on 17 Jul 2019, 02:44 PM

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?

0
Elena
Telerik team
answered on 29 Jul 2019, 11:35 AM
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
 
Tags
General Discussions
Asked by
ME
Top achievements
Rank 1
Answers by
Cody
Telerik team
Mithun
Top achievements
Rank 1
Stoich
Telerik team
Lucas
Top achievements
Rank 1
Elena
Telerik team
Share this question
or