UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21. Read more.
UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21.Read more.
Absent Member.
Absent Member.
3224 views

I need to correlate a value, but the only LB and RB I can use appear thousands of times

I'm looking to make a correlation for a dropdown menu. I need the number inside this option value:

 

<option value="2386">

 

My LB would be <option value=" and RB ">

 

The problem is this returns thousands of values. I can't use ORD since there is always a different number of option values based on earlier actions inside my script. I also don't think REGEXP will help here since there are other option values that contain 4 digits.

 

The reason I can't make my LB more specific is because I need to select a random option value for that drop down menu. This is the full block below:

 

<td colspan="6">
                    <select name="DrpDwnProblemDetail" onchange="javascript&colon;setTimeout(&#39;__doPostBack(\&#39;DrpDwnProblemDetail\&#39;,\&#39;\&#39;)&#39;, 0)" id="DrpDwnProblemDetail" style="width:584px;">
	<option selected="selected" value="0">[SELECT]</option>
	<option value="2386">###########</option>
	<option value="2387">##########</option>
	<option value="2390">###########</option>
	<option value="2388">###########</option>
	<option value="2389">#############</option>

</select></td>

 So I need to scan through and find that drop down menu, the count of option values under it, and then select a random one. This wouldn't be a problem if there weren't hundreds of other identical drop down option values that use the same boundaries, causing me to have a much higher count value than is actually there.

 

I'm not sure if this would be a viable solution, but I set a correlation to take that entire block of text:

 

web_reg_save_param("c_TESTING", "LB=<select name=\"DrpDwnProblemDetail\"", "RB=</select>", LAST);

 Is there some way that I can now perform a correlation on that parameter I just created? This would only return any option values for the correct menu.

 

Any advice would be appreciated, please let me know if I didn't explain this clearly or if more information is needed.

 

*I'm running VuGen 11.52 on Windows 7

0 Likes
2 Replies
Absent Member.
Absent Member.

Hello!

 

May be you can use a parameter file that contains at least 2 colums. One for the selection that is necessary to follow the "earlier action" paired with the values of the drop down list that contains the selections depending on this "earlier action". Then you can select randomly to execute the "earlier action" and use the same line for the drop down value.

 

Regards

Thomas

0 Likes
Commodore
Commodore

Capture the total string with all the corresponding dropdown values and delimit from that string.

 

Like in your case use "

select name="DrpDwnProblemDetail" as the LB and
</select></td> as the RB that will capture all the availabe drop down values. use strtok() function and delimit and select a random one.

Thanks, Ajay
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.