Highlighted
Regular Contributor.. Regular Contributor..
Regular Contributor..
1125 views

web_reg_save_param parameter is not recognized in script

HI,

 

I am scripting against a Siebel application, and I try to catch the Siebel cookie (_sn= etc ect) to parametrize it.

This is my code

 

web_reg_save_param_ex(
"ParamName=Siebel_sn_cookie1",
"LB/IC=_sn=",
"RB/IC=;",
SEARCH_FILTERS,
"Scope=All",
"IgnoreRedirections=Yes",
"RequestUrl=*/start.swe*",
LAST);

 

When i play this, the log says that the parameter was registered succesfull, but then when I try to use the variable in the script, it is not recognised as a variable.

Also the replay blog states:   Warning: The string 'Siebel_sn_cookie1' with parameter delimiters is not a parameter.

 

Any body can give some advice here?

 

0 Likes
2 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: web_reg_save_param parameter is not recognized in script

Automated,

web_reg_save_param_ex is a category of function that reguires that you register it just prior to the message that the function is intended to be used in.

The fact that the replay log says that it is registered doesn't mean that the correlation will actually get a value.

From KB article KM170766:
Some possible reasons for the parameter not to be recognized by VuGen

Here are some of the possible reasons for parameter not to be recognized by Vugen as a parameter.

1. There is a typo such that the spelling or the case of the parameter declared does not match with the one which has been declared.

2. The statement where the value is being substituted is the one immediately after the web_reg_save_param() statement. The value for the parameter is not captured until the response for the immediate HTTP request is obtained. If you substitute the parameter immediately after declaring it with a web_reg_save_param() it will throw the above error. To solve this, verify the location of the web_reg_save_param() statement is correct such that it captures a value before it is substituted in any function call.

3. If you have a parameter that has the same name as the Action, either rename the parameter or the Action to fix this issue.

4. If your data appears to be in the same format as LoadRunner's parameter, e.g {mydata} for Web Vusers, you will have the same problem since "{}" represent a parameter in web script. If this happens, refer to Document ID 18876 - How to change the default parameter braces.

5. If none of the above helps, delete the parameter and create it again.

I would suggest that you turn on extended logging, make sure that data returned by server is selected and run the script again, with a break point immediately after the HTTP request that is supposed to have the value you want stored in the correlation. Verify that the web_reg_save_param_ex command is immediately before that HTTP request, verify that the LB and RB boundries are valid, and verify that the value that you are looking for does indeed appear in the data returned by the server.

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: web_reg_save_param parameter is not recognized in script

Why don't you print out its value just prior to the actual request that's supposed to use it?

 

Make sure what you're sending is what you expect to send.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.