Quantcast
Channel: Silk Performer
Viewing all articles
Browse latest Browse all 4084

Wiki Page: Counting number of items in a dropdown menu in Silk Performer

$
0
0
Created On:  7th December 2012 Problem: Is there a way to count the number of items within my dropdown menu within Silk Performer whilst testing at the Protocol Level (HTML/HTTP)? Resolution: To count the number of items within a drop down menu, use a WebParseDataBoundArray to extract the information from the source code of the application itself. The WebParseDataBoundArray() function parses the response data for left and and right boundaries and stores all strings between these boundaries as well as the number of strings found. For example, from the HTML source code below, we can see that the dropdown menu contains 5 items/options, Volvo to Ford. To get a count of these values include a WebParseDataBoundArray() function with a left boundary of “value=” in the Silk Performer script, Two variables are defined within the function, sHead, which is an array of string variables that receive all strings defined within specified boundaries, and sFound, that receives the number of found strings, i.e. the number of strings which match the left boundary “value=”. We include a Print statement which shows that the drop down menu has 5 options. BDL Script Result Note, " ", has been included within the right boundary as this can optionally be assign a null value.   #2604139 Old KB# 36668

Viewing all articles
Browse latest Browse all 4084

Trending Articles