|
本帖最后由 lllo 于 2016-9-2 14:35 编辑
脚本:
web_add_cookie("bdshare_firstime=1472782220512; DOMAIN=yx.testrighthere.com");
web_add_cookie("pt2gguin=o1909296483; DOMAIN=s.pc.qq.com");
web_add_cookie("RK=q22Gp/fTY2; DOMAIN=s.pc.qq.com");
web_add_cookie("ptcz=dc49ef3d8f4c27937569c1b1a59838feb4a3023712a45d26413fd046f1f30bfc; DOMAIN=s.pc.qq.com");
web_url("ResourceEdit",
"URL=http://yx.testrighthere.com/Resource/ResourceEdit/?CID=32",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t32.inf",
"Mode=HTML",
EXTRARES,
"Url=/Scripts/layer/skin/layer.css", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
"Url=/images/login_bg.jpg", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
"Url=/images/login_input02.png", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
"Url=/images/login_input03.png", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
"Url=/images/login_input01.png", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
"Url=/images/login_butn01.png", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
"Url=/images/img_footer.png", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
"Url=http://s.pc.qq.com/pcmgr/zonedword/gjzonedword20150522.js", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
"Url=http://passport.testrighthere.com/ajax/login.ashx?t=1&u=Z3oyMzB8OTZFNzkyMTg5NjVFQjcyQzkyQTU0OURENUEzMzAxMTI.&callback=jQuery182034851017254961336_1472793121430&_=1472793161015", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
LAST);
lr_start_transaction("login");
//lr_think_time(35);
web_submit_data("CheckLogin",
"Action=http://yx.testrighthere.com/Web/CheckLogin",
"Method=POST",
"RecContentType=text/html",
"Referer=http://yx.testrighthere.com/Web/Login",
"Snapshot=t33.inf",
"Mode=HTML",
ITEMDATA,
"Name=vCode", "Value=11", ENDITEM,
"Name=uName", "Value={uname}", ENDITEM,
"Name=uPass", "Value={upass}", ENDITEM,
LAST);
web_custom_request("InsertLoginPoint",
"URL=http://yx.testrighthere.com/Web/InsertLoginPoint",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=http://yx.testrighthere.com/Web/Login",
"Snapshot=t34.inf",
"Mode=HTML",
"EncType=",
LAST);
web_custom_request("GetTopCID",
"URL=http://yx.testrighthere.com/Web/GetTopCID",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=http://yx.testrighthere.com/Web/Login",
"Snapshot=t35.inf",
"Mode=HTML",
"EncType=",
LAST);
web_url("UserPersonIndex",
"URL=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32",
"Resource=0",
"RecContentType=text/html",
"Referer=http://yx.testrighthere.com/Web/Login",
"Snapshot=t36.inf",
"Mode=HTML",
EXTRARES,
"Url=/images/bg_head.jpg", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
"Url=/images/icon_JF.jpg", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
"Url=/images/icon_TeamLeader.jpg", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
"Url=/images/bg_button.jpg", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
"Url=/images/info.gif", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
"Url=/images/icon_hf.png", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
"Url=/images/pic.gif", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
"Url=/images/bg_title.jpg", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
"Url=/images/bg_0729.jpg", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
"Url=/images/icon_02.jpg", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
"Url=/images/bg_banner_shadow.gif", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
LAST);
lr_end_transaction("login",LR_AUTO);
web_add_cookie("pt2gguin=o1909296483; DOMAIN=c.gj.qq.com");
web_add_cookie("RK=q22Gp/fTY2; DOMAIN=c.gj.qq.com");
web_add_cookie("ptcz=dc49ef3d8f4c27937569c1b1a59838feb4a3023712a45d26413fd046f1f30bfc; DOMAIN=c.gj.qq.com");
//lr_think_time(11);
web_reg_find("Search=ALL",
"SaveCount=ac_count",
"Text=来到教师研修社区",
LAST);
web_url("mailreport",
"URL=http://c.gj.qq.com/fcgi-bin/mailreport?gjguid=888bdd41c8d21271aadfc6d7089fce76&monitorid=618069&bid=1&query=&refer=http%3A%2F%2Fyx.testrighthere.com%2FUserPerson%2FUserPersonIndex%2F%3FCID%3D32",
"Resource=1",
"RecContentType=applation/octet-stream",
"Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32",
LAST);
web_url("sogou_tips_v1.png",
"URL=http://mat1.gtimg.com/www/sogou/sogou_tips_v1.png",
"Resource=1",
"RecContentType=image/png",
"Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32",
"Snapshot=t37.inf",
LAST);
web_find("Text Check", "What=来到教师研修社区", LAST);
if(atoi(lr_eval_string("{ac_count}"))>0)
lr_output_message("登录成功");
else
lr_error_message("登录失败");
return 0;
日志:
Action.c(102): 注册 web_reg_find 成功 [MsgId: MMSG-26390]
Action.c(107): 注册的 web_reg_find 对于“Text=来到教师研修社区”成功 [MsgId: MMSG-26362]
Action.c(107): 通知: 保存参数“ac_count = 0”。
Action.c(107): web_url("mailreport") 已成功,0 个正文字节,228 个标头字节 [MsgId: MMSG-26386]
Action.c(114): web_url("sogou_tips_v1.png") 已成功,1661 个正文字节,514 个标头字节 [MsgId: MMSG-26386]
Action.c(122): “Text Check”成功。找到“来到教师研修社区”的 1 处出现(RightOf=“”,LeftOf=“”) [MsgId: MMSG-27196] web_find也已经找到了内容,为什么没有统计个数呢
Action.c(122): web_find 已成功 [MsgId: MMSG-26392]
Action.c(125): 通知: 参数替换:参数“ac_count”=“0”
Action.c(128): 错误: 登录失败
|
|