HTML_GetFormValueByURL Function

Description:

The HTML_GetFormValueByURL function returns an HTML form value.

Format:

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

Parameters:

szVar

A string variable into which the value 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.

Example:

STRING szVar;
STRING szHTML;

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

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

LOG "szVar = " + szVar;

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