11
Action()
{
web_add_auto_header("Accept-Language",
"zh-cn");
web_reg_save_param("userSession",
"LB=122",
"RB=>",
LAST);
web_url("WebTours",
"URL=http://localhost:1080/WebTours",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
LAST);
lr_think_time(7);
lr_rendezvous("loginNum");
lr_start_transaction("login");
web_reg_find("Search=Body",
"SaveCount=num",
"Text=jojo",
LAST);
web_submit_data("login.p1",
"Action=http://localhost:1080/WebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:1080/WebTours/nav.pl?in=home",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=122{userSession}", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=on", ENDITEM,
"Name=login.x", "Value=47", ENDITEM,
"Name=login.y", "Value=3", ENDITEM,
LAST);
if(atoi(lr_eval_string( "{num}" ))>=1){
lr_end_transaction("login",LR_PASS);
}
else{
lr_end_transaction("login",LR_FAIL);
}
lr_think_time(8);
web_image("SignOff Button",
"Alt=SignOff Button",
"Snapshot=t5.inf",
LAST);
return 0;
}