今天我成功关联,LR自带的网站
今天我成功关联,LR自带的网站总结:
1、看到一个视频,order=1,是错的。而是3!
2、中文版不稳定,录制脚本经常不一致!
脚本如下:
Action()
{
web_reg_save_param("session_name",
"LB=name=userSession value=",
"RB=>",
"Ord=3",
LAST);
web_url("mercuryWebTours",
"URL=http://127.0.0.1:1080/mercuryWebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_reg_find("Text=nianyong",
LAST);
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/mercuryWebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?in=home",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value={session_name}", ENDITEM,
"Name=username", "Value=nianyong", ENDITEM,
"Name=password", "Value=111111", ENDITEM,
"Name=JSFormSubmit", "Value=on", ENDITEM,
"Name=login.x", "Value=0", ENDITEM,
"Name=login.y", "Value=0", ENDITEM,
LAST);
web_image("SignOff Button",
"Alt=SignOff Button",
"Snapshot=t3.inf",
LAST);
return 0;
}
测试结果图:
恭喜::zhuhe::: 你是木瓜?
我Q上面有个叫“木瓜”的 不是今天我群里那个吧?:D
正是群里那个,哈
TO zee! 补充问题:为什么脚本执行成功,而到控制器运行却失败?谢谢!~提示:Action.c(9): Error -26377: No match found for the requested parameter "session_name". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size
如图:
[ 本帖最后由 tiannianyong 于 2008-11-12 13:27 编辑 ] lr的网站可以通过自动关联扫描做出来的。。所以别手工写了。。。 TO zee! 补充问题:为什么脚本执行成功,而到控制器运行却失败? 在controller里把LOG打开看看,Session是不是取到了? 好,谢了!
回复 1# 的帖子
{web_reg_save_param("session_name",
"LB=name=userSession value=",
"RB=>",
"Ord=3",
LAST);
web_url("mercuryWebTours",
"URL=http://127.0.0.1:1080/mercuryWebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_reg_find("Text=aa",
LAST);
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/mercuryWebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?in=home",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value={session_name}", ENDITEM,
"Name=username", "Value=aa", ENDITEM,
"Name=password", "Value=1234", ENDITEM,
"Name=JSFormSubmit", "Value=on", ENDITEM,
"Name=login.x", "Value=0", ENDITEM,
"Name=login.y", "Value=0", ENDITEM,
LAST);
web_image("SignOff Button",
"Alt=SignOff Button",
"Snapshot=t3.inf",
LAST);
return 0;
}
怎么会这样错呢
Action.c(9): Error -26377: No match found for the requested parameter "session_name". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size
Action.c(9): web_url("mercuryWebTours") highest severity level was "ERROR", 52180 body bytes, 1566 header bytes 正确的写法应该是,针对LR9.1自带网站
web_reg_save_param("WCSParam_Diff1",
"LB=userSession value=",
"RB=>",
"Ord=1",
"RelFrameId=1.2.1",
"Search=Body",
"IgnoreRedirections=Yes",
LAST);
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"TargetFrame=body",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value={WCSParam_Diff1}", ENDITEM,
"Name=username", "Value=admin", ENDITEM,
"Name=password", "Value=admin", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=0", ENDITEM,
"Name=login.y", "Value=0", ENDITEM,
LAST);
回复 11# 的帖子
8.1不能关联吗
页:
[1]