When you run a script, the web_reg_save_param function scans the subsequent HTML page that is accessed. You specify a left and/or right boundary and VuGen searches for text between those boundaries. When VuGen finds the text, it assigns it to a parameter.
The function’s syntax is as follows:
int web_reg_save_param (const char *mpszParamName, <List of Attributes>, LAST);
The following table lists the available attributes. Note that the attribute value strings (for example, Search=all) are not case sensitive.
- NotFound: The handling method when a boundary is not found and an empty string is generated. "ERROR," the default, indicates that VuGen should issue an error when a boundary is not found. When set to "EMPTY," no error message is issued and script execution continues. Note that if Continue on Error is enabled for the script, then even when NOTFOUND is set to "ERROR," the script continues when the boundary is not found, but it writes an error message to the Extended log file.
- LB: The left boundary of the parameter or the dynamic data. This parameter must be a non-empty, null-terminated character string. Boundary parameters are case sensitive; to ignore the case, add "/IC" after the boundary. Specify "/
BIN" after the boundary to specify binary data.
- RB: The right boundary of the parameter or the dynamic data. This parameter must be a non-empty, null-terminated character string. Boundary parameters are case sensitive; to ignore the case, add "/IC" after the boundary. Specify "/
BIN" after the boundary to specify binary data.
- RelFrameID: The hierarchy level of the HTML page relative to the requested URL. The possible values are ALL or a number.
- Search: The scope of the search—where to search for the delimited data. The possible values are Headers (search only the headers), Body (search only Body data, not headers), or ALL (search Body and headers). The default value is ALL.
- ORD: This optional parameter indicates the ordinal or occurrence number of the match. The default ordinal is 1. If you specify "All," it saves the parameter values in an array.
- SaveOffset: The offset of a sub-string of the found value, to save to the parameter. The default is 0. The offset value must be non-negative.
- Savelen: The length of a sub-string of the found value, from the specified offset, to save to the parameter. The default is -1, indicating until the end of the string.
- Convert: The conversion method to apply to the data:
- HTML_TO_URL: convert HTML-encoded data to a URL-encoded data format
- HTML_TO_TEXT: convert HTML-encoded data to plain text format