Parameterized Learning of LR
The following is the code I used when I studied
/ / record login elapsed time
Lr_start_transaction ("login")
Web_reg_find ("Text=test"
LAST)
Web_submit_data ("login.pl"
"Action= http://localhost:1080/WebTours/login.pl",
"Method=POST"
"TargetFrame=body"
"RecContentType=text/html"
"Referer= http://localhost:1080/WebTours/nav.pl?in=home",
"Snapshot=t11.inf"
"Mode=HTML"
ITEMDATA
"Name=userSession", "Value=120470. {CorrelationParameter_3} zVQzHA {CorrelationParameter_1} DHViAp {CorrelationParameter_2}", ENDITEM
"Name=username", "Value= {username}", ENDITEM
"Name=password", "Value= {pwd}", ENDITEM
"Name=login.x", "Value=43", ENDITEM
"Name=login.y", "Value=12", ENDITEM
"Name=JSFormSubmit", "Value=off", ENDITEM
LAST)
/ / record the end time of things, and LR_AUTO automatically gets the end status.
Lr_end_transaction ("login", LR_AUTO)
Username and pwd are the parameterized displays of my user name and password. First of all, we can right-click on the mouse and select new parameter in replace with a parameter or insert to enter the interface, as shown below:
Clicking Create Table will bring up the table, in the table, click Edit with Notepad again, and then open a notepad, and we can add data to the notepad.
Database add data
In many cases, the data I added is not ten or twenty, nor one hundred or two hundred. If I still add it in the above two ways, I think it will be a very complicated thing. So we can import the data through the database. Do you wonder what to do with the data in the database? the data generation in the database is very simple. You can write a simple code to generate it, or you can do it through the database data generation tool.
Click Date Wizard to open the connect database wizard.
Other type settings
If we don't want to parameterize a file, such as a specific date and time, we can choose from the Parameter type list.
As for the user name and password to associate, you need to click "Properites …" The edit user name parameterization window opens. In the File list box, the file "username.dat" that just saved the user name information. Then click "Add Column..." To add a new column of information to place the password Finally, click "Edit with Notepad" to edit the parameterized data file again, and use the user name password to establish an one-to-one correspondence.