|
1 录制LR自带的例子 登录和退出,不做其它动作
图片中是树结构 ,例如:有WebTours和WebTours_2 里面的代码也一样的
求问:为什么我录制一次代码出现两个基本重复的代码?
具体录代码如下:
Action()
{
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t23.inf",
"Mode=HTML",
LAST);
web_submit_data("check_outchain.php",
"Action=http://qurl.f.360.cn/check_outchain.php",
"Method=POST",
"EncType=multipart/form-data",
"TargetFrame=",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t24.inf",
"Mode=HTML",
ITEMDATA,
"Name=urls", "Value=c9ada0bb27a211c6b9976f5b1951c78f|f528764d624db129b32c21fbca0cb8d6|c4ca4238a0b923820dcc509a6f75849b|cb5ae17636e975f9bf71ddf5bc542075|25e64aa754c310d45c1e084d574c1bb0|f528764d624db129b32c21fbca0cb8d6|78cac39b0f129b952e1be617c698a0fb\tZGV3YwNhZP4kCm9ZCj==\n", ENDITEM,
"Name=src", "Value=addrbar", ENDITEM,
"Name=product", "Value=wd", ENDITEM,
"Name=combo", "Value=urlproc", ENDITEM,
"Name=v", "Value=1", ENDITEM,
"Name=vk", "Value=ba2248aa", ENDITEM,
"Name=mid", "Value=90fb93b6681e5e66447926bd20bead7f", ENDITEM,
LAST);
web_url("WebTours_2",
"URL=http://127.0.0.1:1080/WebTours/",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t25.inf",
"Mode=HTML",
LAST);
web_submit_data("check_outchain.php_2",
"Action=http://qurl.f.360.cn/check_outchain.php",
"Method=POST",
"EncType=multipart/form-data",
"TargetFrame=",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t26.inf",
"Mode=HTML",
ITEMDATA,
"Name=urls", "Value=c9ada0bb27a211c6b9976f5b1951c78f|f528764d624db129b32c21fbca0cb8d6|c4ca4238a0b923820dcc509a6f75849b|cb5ae17636e975f9bf71ddf5bc542075|25e64aa754c310d45c1e084d574c1bb0|f528764d624db129b32c21fbca0cb8d6|78cac39b0f129b952e1be617c698a0fb\tZGV3YwNhZP4kCm9ZCj==\n", ENDITEM,
"Name=src", "Value=addrbar", ENDITEM,
"Name=product", "Value=wd", ENDITEM,
"Name=combo", "Value=urlproc", ENDITEM,
"Name=v", "Value=1", ENDITEM,
"Name=vk", "Value=ba2248aa", ENDITEM,
"Name=mid", "Value=90fb93b6681e5e66447926bd20bead7f", ENDITEM,
LAST);
lr_think_time(8);
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t27.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=107096.379019846ffAiHzQpQQfiDDDDDDAfcpzVQQHf", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=25", ENDITEM,
"Name=login.y", "Value=7", ENDITEM,
LAST);
web_submit_data("login.pl_2",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t28.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=107096.379019846ffAiHzQpQQfiDDDDDDAfcpzVQQHf", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=25", ENDITEM,
"Name=login.y", "Value=7", ENDITEM,
LAST);
web_url("SignOff Button",
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=1",
"TargetFrame=body",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",
"Snapshot=t29.inf",
"Mode=HTML",
LAST);
web_add_cookie("MSO=SID&1322104799; DOMAIN=127.0.0.1");
web_add_cookie("MTUserInfo=firstName&Joseph&address2&San%20Jose%2FCA%2F94085&username&jojo&hash&47&lastName&Marshall%0A&address1&234%20Willow%20Drive&creditCard&&expDate&%0A; DOMAIN=127.0.0.1");
web_url("SignOff Button_2",
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=1",
"TargetFrame=body",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",
"Snapshot=t30.inf",
"Mode=HTML",
LAST);
return 0;
} |
|