You should create a correlation parameter array to capture all the values of links on the page or all lists in the dropdown. To do this you should use web_reg_save_param on the top of the request which returns the complete list in its response.
Suppose your web page contains a list of links or a dropdown list, and you want to randomly select and hit a link or a value in the dropdown.
You should create a correlation parameter array to capture all the values of links on the page or all lists in the dropdown. To do this you should use web_reg_save_param on the top of the request which returns the complete list in its response.
0 Comments
Sometimes when you copy paste a code from one script to another, and the code contains parameterized values, you need to take a bit extra care.
The parameters is not recognized in the current script. To make sure this follow below steps after copying the script contents - Copy all parameter files used (.dat, .txt, .csv) from script 1 location to script 2 folder Open .prm file in notepad for script 1, Select All and copy paste content to .prm file in script 2 folder. Now it should work. you can confirm it by looking at the code in the script 2. you would see rectangle around the parameter name if it is recognized. Otherwise confirm by running the script. There might be issue even at this stage. This is the case when the parameter delimiter used in these two scripts is different. Instead of hitting and trying different delimiters at your choice. Better to first confirm the configuration of parameter delimiter in both the scripts. in VuGen 11.5 go to - Design -> Parameters -> Configure Parameter Delimiters First most recommended action is to use some JSON format Validator - i.e.-
http://jsonlint.com/ Go to Start
Click on Run... Type "regedit" to open Registry Editor go to following folder location from left hand side Windows Explorer- My Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\Currentversion\Internet Settings Method 1
Open IE Go to Tools -> Internet Options Go to Programs tab And click on Make Default button But sometimes your account is not given permission to change some of the internet settings, majorly if you are working onsite at client's place and your client is a major bank- Sometimes the correlation fails due to the size of to be captured text is exceeding the max size limit.
Sample Error- Error -26377: No match found for the requested parameter "param_name". Check weather the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size. Same error would appear if boundaries are defined incorrectly, such that no data exists between defined boundaries. Problem Definition
Whichever web application I wanted to record using IE, connection is not made. And this error is displayed "Internet Explorer cannot display the webpage". lr_save_datetime()
// saving current date and time in format (DD MMM YYYY) to variable "itemOfferDate" lr_save_datetime("%d %b %Y", DATE_NOW, "itemOfferDate"); //displaying value of "itemOfferDate" variable in Output window lr_output_message(lr_eval_string("{itemOfferDate}")); Sometimes the value you want to pass as parameter, contains special characters i.e. space, comma, Quotes "" etc. i.e. [{"employeeName":"VARUN YADAV","country":"IN",..............
In such case you get difficulty parameterizing such value using normal DAT file parameter type. I prefer TAB delimited because the value itself contains commas. Using CSV - When use CSV or dat you get errors in Loadrunner, something like this- "Error line 2 contains 9 columns while expecting 7 columns" now review the data per column in the parameter list in vugen. You would notice that the data in data row is split at some point in two columns while expecting it to remain in one. this is because of comma or spaces in the value. Using TAB delimited - 1. keep the master excel files for further modification in data and regenerating other formats. 2. then save-as to a TAB delimited with TXT extension. 3. At this point close excel without saving (you have already saved everything). The parameter wizard will let you select the txt file name; otherwise rename it to a DAT after you close excel and before you open vugen. |
AuthorVARUN YADAV ArchivesCategories
All
|