|
6#
楼主 |
发表于 2010-8-13 16:53:14
|
只看该作者
真不好意思,因为在产品部练习的东西出不来,现在贴一把,帮忙分析一下,谢谢
Action()
{
web_add_cookie("DefalutOrg=Page.Logon=38f714c7-7952-4c3e-96d2-6d31c7ee2ff3; DOMAIN=172.18.6.212");
web_add_cookie("visitedforums=11,10,6,7,5,3,4,2; DOMAIN=172.18.6.212");
web_add_cookie("lastpostedforum=3; DOMAIN=172.18.6.212");
web_add_cookie("onlineusercount=1; DOMAIN=172.18.6.212");
web_add_cookie("lastolupdate=2138323203; DOMAIN=172.18.6.212");
//首页
web_url("index.aspx",
"URL=http://172.18.6.212:85/",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t13.inf",
"Mode=HTML",
EXTRARES,
"Url=/templates/grass/images/submenubg.gif", ENDITEM,
"Url=/templates/grass/images/bodybg.jpg", ENDITEM,
"Url=/templates/grass/images/icon_search.gif", ENDITEM,
"Url=/templates/grass/images/icon_drop.gif", ENDITEM,
"Url=/templates/grass/images/icon_subnav.gif", ENDITEM,
"Url=/templates/grass/images/icon_announcement.gif", ENDITEM,
"Url=/templates/grass/images/forum.gif", ENDITEM,
"Url=/templates/grass/images/forum_new.gif", ENDITEM,
"Url=/templates/grass/images/online.gif", ENDITEM,
"Url=/templates/grass/images/portalbox_bg.gif", ENDITEM,
"Url=/templates/grass/images/usericon.gif", ENDITEM,
"Url=/templates/grass/images/forumbg.gif", ENDITEM,
"Url=/templates/grass/images/noavatar_small.gif", ENDITEM,
"Url=/templates/grass/images/loading.gif", ENDITEM,
"Url=/images/level/2.gif", ENDITEM,
"Url=/templates/grass/images/right.gif", ENDITEM,
LAST);
//打开注册页面
web_url("注册",
"URL=http://172.18.6.212:85/register.aspx?stamp=0.19711944759254524&infloat=1&handlekey=register&inajax=1&ajaxtarget=floatwin_register",
"TargetFrame=",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://172.18.6.212:85/",
"Snapshot=t14.inf",
"Mode=HTML",
LAST);
lr_think_time(6);
web_url("ajax.aspx",
"URL=http://172.18.6.212:85/tools/ajax.aspx?t=checkusername&username=wan",
"TargetFrame=",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://172.18.6.212:85/",
"Snapshot=t15.inf",
"Mode=HTML",
LAST);
web_url("ajax.aspx_2",
"URL=http://172.18.6.212:85/tools/ajax.aspx?t=checkusername&username=wang",
"TargetFrame=",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://172.18.6.212:85/",
"Snapshot=t16.inf",
"Mode=HTML",
LAST);
web_url("ajax.aspx_3",
"URL=http://172.18.6.212:85/tools/ajax.aspx?t=checkusername&username=wangen",
"TargetFrame=",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://172.18.6.212:85/",
"Snapshot=t17.inf",
"Mode=HTML",
LAST);
web_url("ajax.aspx_4",
"URL=http://172.18.6.212:85/tools/ajax.aspx?t=checkusername&username=wangen",
"TargetFrame=",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://172.18.6.212:85/",
"Snapshot=t18.inf",
"Mode=HTML",
LAST);
web_url("ajax.aspx_5",
"URL=http://172.18.6.212:85/tools/ajax.aspx?t=checkusername&username=wangenm",
"TargetFrame=",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://172.18.6.212:85/",
"Snapshot=t19.inf",
"Mode=HTML",
LAST);
web_url("ajax.aspx_6",
"URL=http://172.18.6.212:85/tools/ajax.aspx?t=checkusername&username=wangenmao",
"TargetFrame=",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://172.18.6.212:85/",
"Snapshot=t20.inf",
"Mode=HTML",
LAST);
web_url("ajax.aspx_7",
"URL=http://172.18.6.212:85/tools/ajax.aspx?t=checkusername&username=wangenmao",
"TargetFrame=",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://172.18.6.212:85/",
"Snapshot=t21.inf",
"Mode=HTML",
LAST);
lr_think_time(21);
//此处添加了检查点
web_reg_find("Search=Body",
"SaveCount=regst",
"Text=注册成功",
LAST);
lr_start_transaction("register");
web_submit_data("register.aspx",
"Action=http://172.18.6.212:85/register.aspx?infloat=1&createuser=1&&inajax=1",
"Method=POST",
"TargetFrame=",
"RecContentType=text/xml",
"Referer=http://172.18.6.212:85/",
"Snapshot=t22.inf",
"Mode=HTML",
ITEMDATA,
"Name=username", "Value={username}", ENDITEM,
"Name=password", "Value={password}", ENDITEM,
"Name=password2", "Value={password}", ENDITEM,
"Name=email", "Value=wem@cpb.com", ENDITEM,
"Name=regsubmit", "Value=鍒涘缓鐢ㄦ埛", ENDITEM,
LAST);
if(atoi(lr_eval_string("{regst}"))>0)
lr_end_transaction("register", LR_PASS);
else
lr_end_transaction("register", LR_FAIL);
return 0;
} |
|