检查点检查不到信息
discuz论坛,登录和注册页面,若登录/注册成功,系统会弹出登录成功或者是注册成功的提示窗体。通过web_reg_find()检查“登录成功”或者“注册成功”,系统总是找不到。我确实是在提交请求之前检查的,也打开了检查点功能。请教了 谁帮帮我? 一般不是你检查点位置不对,就是你中文录制不对,你总要贴个代码上来吧,否则我们也就猜猜 web_reg_find()要放在查找内容前面,最好你还是代码发出来,才能更好分析到原因 楼主怎么没反应了,来个代码看看啊 真不好意思,因为在产品部练习的东西出不来,现在贴一把,帮忙分析一下,谢谢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;
} 应该是中文问题
页:
[1]