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

GUIDs in URL and Form Values

5 Answers 152 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Todd
Top achievements
Rank 1
Todd asked on 04 Nov 2010, 06:18 PM
I'm using WebUI Test Studio 2010.2 to test an application that deals with orders for temporary workers.  When a new temp order is created, a new guid is generated by the application and comes back to the web browser in a session variable.  That value is then used in multiple places - links on the page, the url in the address bar, etc.  Each time a new temp order is created it has a new guid. Note that the actual creation of the new guid and the new temp order record in the DB occurs upon the submission of form 1 in a 5-form process.  So on page 1 there is no temp order and thus no guid.  On pages, 2-5 - and all attendant lookups/popups - the guid hangs around to ensure all the actions are performed against that exact order and no other.

At the moment, the recorder does a fine job of recording all of these values but of course running the test fails since it's looking for the guids found when it was recorded, and now they're all 'wrong'.  The guids are not sequential, they are totally random in the form of "8-4-4-4-12" , a hexidecimal string.  I can't imagine the idea of dynamic values - that are not pre-recorded in a file - hasn't occurred to anyone at  Telerik.  I'm sure it's my own ignorance of the test suite, but I can't find any information about this in the docs.  How do I get this done?

Thanks,
Todd B.

5 Answers, 1 is accepted

Sort by
0
Keaegan
Telerik team
answered on 05 Nov 2010, 06:07 PM
Hi Todd,

Can you please try doing the following for me:

  1. Open your project
  2. Open a test within the project that has a Connect to pop-up window test step
  3. Click on the Connect to pop-up window test step to highlight it
  4. This will bring up the item properties on the right side of the window, we will be working in the Behavior Category
  5. Make sure IsUrlPartial is set to True
  6. In the pop-up url field, delete all the GUID data from the link (see example below)

Example:
If the pop-up url was
http://www.telerik.com/support.htm?supportid=31427&versionid=10.2

You would modify the PopupUrl field to instead read:

http://www.telerik.com/support.htm

In many cases, this would require deleting the initial '?' (questionmark) and all data after it, but your pop-up may be unique.

If you would like, we can help you modify this line item but we have to know what the Pop-up url is so that we can modify it with you. In this case, please provide us with the Popup window url.


Kind regards,
Keaegan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Todd
Top achievements
Rank 1
answered on 05 Nov 2010, 07:59 PM
I must be missing something.  None of the tests I have contain a step showing the IsUrlPartial property in the properties pane.  Note, the 'popups' in this application are actually just DHTML layers that become visible or hidden based on mouse clicks.  This was done to make the app compatible with iPads, Netbooks and cell phone browsers.

Are you trying to say that the comparisons of URLs should be ignored?  Or I guess you mean the parameters in the query string.
0
Keaegan
Telerik team
answered on 08 Nov 2010, 10:40 PM
Hi Todd,

Thank you for the update. With this further information on how your "pop-up's" are handled, it does indeed change how this will be accomplished. Since the items do not generate a window themselves you will not see the information I suggested in the properties (though if you need to do this with a pop-up window, the previous data will accomplish this). I apologize for any confusion this caused.

You are correct, the point of the previous steps was to remove the parameters in the query string. The "target urls" for these items should be updated to not include any of the parameters for the query string.

If you are still having issue, would it be possible to provide us with a compressed (either .zip or .rar) copy of the project you are running? 

Regards,

Keaegan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Avraham
Top achievements
Rank 1
answered on 23 Dec 2010, 08:07 PM
I have a similar issue with slightly different details.
In my case URLs may be something like the following:

?QUERIES_EXIST=1&QUERY-DELETE_CONFIRM=1&CANCEL=Cancel&PV=13&CC=3&PAGE=DELETE&RT=GE&GF=DEL

Here, the stumbling block is the "PV=13" which was recorded for record 13 but will be different.

I tried to use a regular expression such as:

?QUERIES_EXIST=1&QUERY-DELETE_CONFIRM=1&CANCEL=Cancel&PV=.*&CC=3&PAGE=DELETE&RT=GE&GF=DEL

But i am not sure this is valid for Telerik (it is valid in other tools), neither am i sure that the query string can even contain a regular expression.

Please help
0
Keaegan
Telerik team
answered on 27 Dec 2010, 09:11 PM

Hello Avraham,

First, the url field does not accept regular expressions. The field will need to be an actual url (or relative/partial url). Was there an issue when using the previously provided method (modifying the pop-up steps url field to only have the url without any GUID or other data within the url field)? For your example:

Let's say your url is "http://www.google.com/default.aspx?=1&QUERY-DELETE_CONFIRM=1&CANCEL=Cancel&PV=13&CC=3&PAGE=DELETE&RT=GE&GF=DEL" for the example. Modify the test step so that the pop-up url is only:

I can certainly submit a Feature Request for the fields to accept the use of "regular expressions", what particular wildcards would you expect to use (besides asterisk, '*'), and what fields would you expect to be able to use them within?

Also, please let us know the feedback you are getting when you run your test with the above type of setup (make sure to use your own test-specific url) in place for the Popup url.

Greetings,
Keaegan
the Telerik team

Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
Tags
General Discussions
Asked by
Todd
Top achievements
Rank 1
Answers by
Keaegan
Telerik team
Todd
Top achievements
Rank 1
Avraham
Top achievements
Rank 1
Share this question
or