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
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.
Cody
What about this issue in new test studio? Can I really use regular expression or query string variable values from excel?
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
Register Today!
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?
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
Test Studio Trainings