Dynamic boundaries

Dynamic boundaries:

Whenever we observe the dynamic value in the boundary use the below two approaches

1.            Text flag:
Using the text flag to handle the dynamic boundaries
Text flags are the Flag used just after the text with Forward Slash.
Some of the commonly known and used Text flags are:
·         /IC to ignore the case
·         /BIN to specify Binary Data
·         /DIG to interpret the pound sign (#) as a wildcard for a single digit
·         /ALNUM<case> to interpret the caret sign (^) as a wildcard for a single US–ASCII alphanumeric character

Let us discuss 4 common cases as examples below:
Case 1: Digit Value
Suppose the response data is the string literal, but the issue is that the left boundary is changing every time; you get the left boundary as axxb, where x ranges between 0 and 3, as follows:
a01b=Correlatedrb
a12b=Correlatedrb
a23b=Correlatedrb

We can capture the desired string by putting the following correlation function in place, using the /DIG text flag in combination with Left Boundary:
web_reg_save_param (“Parameter”, “LB/DIG=a##b\=”, “RB=rb”, LAST);
The corresponding place, which you expect to be dynamically filled in with a digit, should be replaced by a pound sign (#).
Case 2: Boundary is String and case sensitive (IC is used here)
web_reg_save_param (“Parameter”, “LB/IC/DIG=a##b\=”, “RB/IC=rb”, LAST);

Case 3: The dynamic boundary values are alphanumeric, then replace it with “^” in places of either a Digit or a letter  and use the boundary arguments like LB/ALNUM or RB/ALNUM.
Example: 
//<optionvalue=“1st">sun</option>
//<optionvalue=“2nd">mon</option>

web_reg_save_param(“Parameter”, “LB/ALNUM=<option value=\“^^^\">”, “RB/IC=<”, LAST);

Case 4: BIN: When dynamic boundary characters are symbol, use BIN (symbol) text flag and replace with ‘~’ symbol at each place of dynamic symbols occurs 

Example:
 //<optionvalue=“!!!">jan</option>
 //<optionvalue=“@@@">feb</option>

web_reg_save_param (“Parameter”, “<option value=\“~~~\">"”, “RB=<”, LAST);


2.            Save length & Save off set
To handle the dynamic boundaries use the below two arguments in a correlation function
a. 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.
b. 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.
Also used to define the fixed length of characters which are dynamically changing in the left boundary.
.
Example:
input type =”hidden” name=”ORD0” value=”62544094 ID=”
Web_reg_save_param(“Param”,
”LB= input type =\”hidden\” name=\”ORD”,
“RB=\””,
“ORD=all”,
“SaveLen=8”,
“Saveoffset=10”,
LAST);
Savelen=8: Its correlated value length (Value)
Saveoffset=10: It’s a dynamic character length in the boundary.
Note:
1. In the above example I observed the dynamic boundary as 0” value=”(with 10 character length)

2. To use savelen or saveoffset always correlated value length and dynamic boundary length should be constant.

Comments

  1. very useful information... Thank you very much :)

    ReplyDelete
  2. Hi,
    My left boundary is changing intermittently. Out of 100 times 5 times it is changing.
    LB=input type="hidden" name="request_id" value=" -----> 95 times which is appearing
    LB=input type="hidden" name="request_id" value="- -- 5 times appearing

    How to handle this.

    ReplyDelete
  3. Buddy!!!, thank you so much. such an useful stuff it is!!

    ReplyDelete
  4. How would you deal with the left or right boundary with different lengths?

    ReplyDelete
    Replies
    1. Use web_reg_save_param_regexp function.
      More details @ https://www.jds.net.au/correlation-with-regex/

      Delete

Post a Comment

Popular posts from this blog

Steps to Analyze AWR Report in Oracle

Vmstat Output explained

Verifications and Error Handling in LoadRunner *Web_reg_find and Web_reg_save_param*