| || |
Want to capture Ordinal only upto a certain number in web_reg_save_param
The application I am trying to create LoadRunner scripts for has two different types of correlation variables occuring at the same place with same boundary. Both of them are occuring multiple times in multiple lines as follows:
<OPTION Row="318" VALUE="5187">5187 - abc</OPTION>
<OPTION Row="319" VALUE="5370">5370 - xyz</OPTION>
<OPTION Row="320" VALUE="5372">5372 - efg</OPTION>
<OPTION Row="321" VALUE="5378">5378 - jkl</OPTION>
<OPTION Row="318" VALUE="Boy">Boy - abc</OPTION>
<OPTION Row="319" VALUE="Cat">Cat - xyz</OPTION>
<OPTION Row="320" VALUE="Dog">Dog - efg</OPTION>
<OPTION Row="321" VALUE="Cow">Cow - jkl</OPTION>
20 upto 40...
I want to use ORD=ALL to capture the numbers 5187, 5370, 5372, 5378 from group A, but since the boundaries are same for the both groups, I am trying to use the following with two different varaiable i and j respectively:
for (i=1; i<20; i++)
But when I replay the script, the following occurs in the response:
Error -27289: Unrecognized value ("i") for the "Ord" argument (number 4),
Can anybody please guide me on how to overcome this? Are there any other approaches you suggest?
Also, once these values are captured, in subsequent requests, I want to pass them as comma separted such as: abc,xyz,efg,jkl
Any suggestion on how to pass them all as such a comma separated line?
Did you get well trainned in using LoadRunner Tool?
Do you have any mentor to support while you are working in the project?
You don't require 'for loop' to do this & can do this using ORD=ALL. Please understand web_reg_save_param thoroughly from 'help', you will figure out the way
You need a class in C Programming to understand why your "ORD=i" reference will not work
Foundation class skills: Proficiency in the language of your test tool
Yep... know exactly what your problem is... I have been trying to get HP to implement this fix for about 10 years. When you have multiple blocks of data that have the same borders the web_reg_save_param function will grab all of them. Then what do you do? You have data in your ORD values that you didn't want.
The fix is simple... HP needs to allow you to pass your own 'string' to web_reg_save_param. This way you could do a web_reg_save_param to capture a 'larger' block of text, then pass that larger block of text through the function again to get only what you wanted.
What we did was 'recreate' the web_reg_save_param function in our own C code. We mimiced HP's functionality. This allows us to use HP's web_reg_save_param to get the larger block... then use our function to parse it down to what we wanted.
I know your going to ask.. but I cannot distribute the code as it is company property. I would recommend you... and everyone else... put a service request into HP asking them to allow functionality so that you to pass your own string into web_reg_save_param. Just think of the possibilities this would add... and time saved!