HTML_GetFormValueListByURL Function

Description:

The HTML_GetFormValueListByURL function returns a one dimension string array containing an HTML form value list.

Format:

HTTP GET HOST Hostname URL url arrayVar = HTML_GetFormValueListByURL(options, formURL, formURLIndex, valueName);
HTTP GET HOST Hostname URL url arrayVar = HTML_GetFormValueListByURL(options, formURL, formURLIndex, valueName, valueNameIndex);
arrayVar = HTML_GetFormValueListByURL(inputHtml, formURL, formURLIndex, valueName);
arrayVar = HTML_GetFormValueListByURL(inputHtml, formURL, formURLIndex, valueName, valueNameIndex);

Parameters:

arrayVar

A one dimension array string variable into which the values will be loaded.

options

Available options are:

CONTENT  The function is applied on the current HTTP response 

formURL

A string expression containing the form URL ('action' attribute) in the HTML.

formURLIndex

An integer expression containing the form URL index in the HTML.

valueName

A string expression containing the form value name.

valueNameIndex

An integer expression containing the index of the value name in the form.

inputHtml

A string expression containing HTML from which the function will extract a specified form value list.

Example:

STRING arrayVar[];
STRING szHTML;
INTEGER iNbValues;
INTEGER i;

// Retrieve first form in HTML page
HTTP GET HOST "demo.fmstocks.com" URL "/fmstocks/home.asp" arrayVar = HTML_GetFormValueListByURL(content, "default.asp", 1, "login");

HTTP GET HOST "demo.fmstocks.com" URL "/fmstocks/home.asp" szHTML = GetContent();
arrayVar = HTML_GetFormValueListByURL(szHTML, "default.asp", 1, "login");

iNbValues = Bound(arrayVar, 1);
for i = 1 to iNbValues
    LOG "value " + ToString(i) + " = " + arrayVar[i];
endfor

Output:

szVar = ta553

See also:





Go back to the Learning center:


Copyright © AgileLoad. All rights reserved.
Agile Load testing tool| Contact AgileLoad | Terms of Use | Sitemap