|
Diagnosis: While trying to add left and right boundaries in a web_reg_save_param statement using the Insert menu, the special characters are not escaped, unlike in LoadRunner 7.5.
Example:
1. Open a Web script.
2. Right-click -> Insert -> New Step -> web_reg_save_param.
3. Type in any string with special characters for "Left boundary" or "Right boundary."
Example:
value = "apple" name ="fruit"
The line is added without any escape characters added for the quotes, which will eventually cause the script to fail.
Note:
This is a known issue.
--------------------------------------------------------------------------------
Solution: Add convert_to_c_format=1
From Loadrunner 7.51 onwards, do the following:
1. Close VuGen.
2. Go to <%WinDir%>\vugen.ini and edit the file with notepad.
3. Add the key convert_to_c_format=1 under the [WebRecorder] section of vugen.ini.
4. Launch VuGen and try the same steps again.
Note:
The behavior of not escaping special characters is default by definition. The reason is that there are all kinds of pitfalls when trying to understand what a user wants to escape in a string and what not.
Example:
If 7875 is to be captured from the string Value_"\item\"value?7875? , then VuGen puts the function as:
web_reg_save_param("param",
"LB=Value_\"\\item\\"value?",
"RB=?",
LAST);
In other words, VuGen does not know whether the second " is already escaped or not. So the user needs to add the extra \ on his own as shown below:
web_reg_save_param("param",
"LB=Value_\"\\item\\\"value?",
"RB=?",
LAST); |
|