Quantcast
Channel: LoadRunner Practitioners Forum topics
Viewing all articles
Browse latest Browse all 3978

How to do correlation for drop down list

$
0
0

Hi all,

 

I'm trying to do correlation for the selected item in a drop down list (To get the value, such as 000, 1, X). But I'm not sure how to do this. Can you give me some suggestions?

 

The following is the server response for this drop down list.

 

As each value is different from others, I cannot use the array function of the method  web_reg_save_param_ex. I only can extract the string "<option value="">Select One</option><option value= ... retired worker etc)</option>" now.

 

I'm thinking to split the long string into short one by separator '</option>' and save the short strings into an array. Then I can scan the array using key word 'selected' (if statement). for example, if it is found in 'OB' one, then set value '000' into a temp parameter. After that, I can use the value in other place.

 

please correct me if I am wrong.

 

Appreciate if anyone can help to code for this as I'm poor in C. :P

 

Many thanks!

 

<select id="Occup" name="Occup" tabindex="-1">
<option value="">Select One</option>
<option value="000">OB</option>
<option value="1" selected="selected">Legislators, Senior Officials and Managers</option>
<option value="2">Professionals</option>
<option value="3">Technicians and associate Professionals</option>
<option value="4">Clerical workers</option>
<option value="5">Service workers and shop and market sales workers</option>
<option value="6">Agricultural and fishery workers</option>
<option value="7">Production craftsmen and related workers</option>
<option value="8">Plant and machine operators and assemblers</option>
<option value="9">Cleaners, labourers, and related workers</option>
<option value="X">Workers not classifiable by occupation (incl unk)</option>
<option value="Y">Person not working (housewife, retired worker etc)</option>
</select>


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>