I. Description
1, the login script is placed in the Init;
2, to the session to make a connection to ensure the success of the login;
3, the user name to do the file parameterization, to ensure that each iteration of the user name is different, persistent, password unified 123456;
In fact, I want to be executed with the registration script so that the username is processed as time parameterized when registering
4, before using this script, pay attention to the user name early registration, and the registered user name directly in the file parameterized table;
Second, the script (look at the chaos, paste into the LR is good)
Vuser_init () {Web_reg_save_param ("session", "Lb=<input Type=hidden name=usersession value=", "rb=>", "Ord= 1 ", last); Web_reg_find ("Search=all", "Savecount=count", "Text=welcome", last);
Web_url ("Webtours", "url=http://127.0.0.1:1080/webtours/", last);
Web_submit_data ("login.pl", "action=http://127.0.0.1:1080/webtours/login.pl", "Method=post", "TargetFrame=body", " Reccontenttype=text/html "," Referer=http://127.0.0.1:1080/webtours/nav.pl?in=home "," Snapshot=t2.inf "," Mode=HTML ", ItemData," Name=usersession "," Value={session} ", Enditem," Name=username "," Value=elsa{username} ", ENDITEM," Na Me=password "," Value=bean ", Enditem," Name=jsformsubmit "," Value=off ", Enditem," name=login.x "," value=56 ", ENDITEM, "Name=login.y", "value=10", Enditem, last); Lr_output_message ("%s", Lr_eval_string ("{count}")); return 0; }
Flight Booking-2 Login Success Script