web_reg_save_param_ex

web_reg_save_param_ex

web_reg_save_param function is deprecated from 12.5 version of Loadrunner. Therefore web_reg_save_param_ex and web_reg_save_param_xpath is introduced. Here we will see about web_reg_save_param_ex function and its attributes.

 Syntax :

web_reg_save_param_ex("ParamName=<output parameter name>", [LB[/IC][BIN]=<value>, ][RB[/IC][BIN]=<value>, ] <List of Attributes>, <SEARCH FILTERS>,LAST );

Example : 

web_reg_save_parama_ex

Most important list of attributes present in the function.

ParamName:

  • It store the dynamic values in the specified variable which is found using the attribute.

LB:

  • Left boundary of the dynamic value which we need to capture.
  • If the LB is empty, then it will capture all the characters from the starting of the boundary.
  • It is case sensitive, therefore when you are specific the boundary make sure they are exactly same as it is displayed.
  • One can further customize the search text, by using one or more text flags.
  • Its the most important attribute is mandatory.

RB:

  • Right boundary of the dynamic value which we need to capture.
  • If the RB is empty, then it will capture all the characters from the starting of the boundary.
  • It is case sensitive, therefore when you are specific the boundary make sure they are exactly same as it is displayed.
  • One can further customize the search text, by using one or more text flags.
  • Its the most important attribute is mandatory.

List of Attributes :

Most important attributes used in this section.

  • ORD:
    • It will Indicates the ordinal position of the dynamic value or instance of the match of the value.
    • If you specify as "All," it saves the parameter values in an array.
    • Default value of the instance is 1.
    • This attribute is optional.
  • NOTFOUND :
    • It used to handle when the boundary is empty string in the response.
    • "Not found=error" is the the default value. It will raise the error when a boundary is not found.
    • "Not found=warning" does not raise an error. Therefore "warning" option is ideal if you want to see if the string was found and you do not want the script to fail.
    • This attribute is optional as well.
  • SaveLen :
    • Length of the sub-string where the value is found, from the specified offset, to save into parameter.
    • Default value is -1, indicating to save to the end of the string.
    • This attribute is optional.
  • SaveOffset:
    • Offset of a sub-string where the value is found, to save into parameter.
    • Value must be non-negative.
    • Default value is 0.
    • This attribute is optional.

SEARCH_FILTERS :

Search Filters starts with the marker that is SEARCH_FILTERS. The SEARCH_FILTERS section is option, therefore we can use this when it is required only. Below are the most important specifiers used in this section.

  • ContentType:
    • Only responses with the specified ContentType header are searched.
    • Therefore this will search only the header section of the response.
    • The ContentType can contain the * wildcard.
  • HeaderNames:
    • We can give a list  of HTTP response header names with comma-separated.
    • Therefore only the specified headers' values are searched in the response.
    • It will be applied only when the Scope is "Headers".
    • If no Ordinal value is specified, the first occurrence of a match of the LB and RB is found.
  • Ignore Redirections:
    • If you set the attribute "Ignore Redirections=Yes", then if the server response contains any redirection information like (HTTP status code 300-303, 307). The response is not searched. Instead, once the redirection response is received, the GET request is sent to the redirected location. And the search is performed.
    • Therefore the default value is "Ignore Redirections=No".
    • This attribute is optional.
  • RelFrameID :
    • It specific the hierarchy level of the HTML page which is related to the requested URL.
    • Default value is ALL.
    • This attribute is optional.
  • RequestURL:
    • Only responses to this request are searched.
    • The URL can contain the * wildcard.
    • Therefore you can specif any wildcard in this section.
  • Scope:
    • Most important section is to specific where you need to search for the delimited data.
    • The possible values are:
      • All- Search the entire buffer.
      • Headers - Search only the headers.
      • Body - Search only body data.
      • Cookies - Search only in cookies.
    • This attribute is Optional.

Leave a Reply

Your email address will not be published. Required fields are marked *