Highlighted
Absent Member.. Absent Member..
Absent Member..
109 views

Ordinal Changes every iteration

Hello All, 

I am working on a script where the ordinal of one of the correlated values changes every iteration. One iteration the necessary value may be ordinal=27...next iteration the ordinal=11...next iteration oridinal=13. Is there a way to capture the exact value needed? It is a very "weird' application because the left/right boundaries change as well so I cannot extend the left/right boundaries to be captured. I am using loadrunner 12.53 with Windows 7. Thanks to anyone in advance for their help.  

    web_reg_save_param_ex(
        "ParamName=vstablepid_2719_1State",
        "LB=value=\"",
        "RB=\"",
        "Ordinal=ALL",  //ordinal number changes every iteration
        SEARCH_FILTERS,
        "Scope=Body",
        "IgnoreRedirections=No",
        "RequestUrl=*/Advantage;*",
        LAST);

 

0 Likes
3 Replies
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Ordinal Changes every iteration

Hi,

 

Could you share the script with the full extened log and give more details about the value you want to correalte so that we can check on the script?

 

 

Regards,

Chau Nguyen | SW Technical Support Consultant.
LoadRunner and Performance Center


If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Ordinal Changes every iteration

(1) The left and right boundaries change every 2-3 iterations so I can only use "value =" with oridinals to capture the value;

(2)There are a lof of variables returned using "value=#" and the value I need changes depending on how many values are returned when I click the "Search" button in the application. 

Iteration 1: 

</tr>\n
 <input name="vstablepid_271a_1State" value="1091299858" type="hidden">\n
 \r\n

 

Iteration 3: 

</tr>\n
<input type="hidden" value="1567033671" name="vstablepid_271a_1State">\n
\r\n

 

So 

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Ordinal Changes every iteration

Hello

As the LB and RB changes with (almost) every iteration, you can't use the built in correlation as you noticed. This do not mean that you are chanceless, you just need to do some more manual work.

As you have described it, I would have done something like this:

* Use web_reg_save_param_ex with LB="<input" and RB =">" This will catch all of the inputs that can be valid.
* Loop through the catched values and see if it contains "vstablepid_271a_1State"
* If it does, find the position of "value="" and then the following " in the string and extract the value.
* Save the value to a LR parameter using lr_save_string 

Then you can use the parameter just as the correlated one.

 

.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.