TA的每日心情 | 开心 2015-3-19 22:34 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
本帖最后由 music51555 于 2015-4-26 11:59 编辑
web_reg_find("text=welcome",
LAST);
1. 该函数放在web_submit_form前就可以查找到“welcome”
日志为:
web_submit_form("login.pl") was successful
2. 但是放在web_submit_data前就无法查找到
日志为:
Action.c(22): Error -26366: "Text=welcome" not found for web_reg_find [MsgId: MERR-26366]
Action.c(22): web_submit_data("login.pl") highest severity level was "ERROR", 795 body bytes, 225 header bytes [MsgId: MMSG-26388]
录制的脚本为:
web_submit_form:
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=../favicon.ico", "Referer=", ENDITEM,
LAST);
web_reg_find("text=welcome",
LAST);
web_submit_form("login.pl",
"Snapshot=t4.inf",
ITEMDATA,
"Name=username", "Value=alex", ENDITEM,
"Name=password", "Value=30761234", ENDITEM,
"Name=login.x", "Value=53", ENDITEM,
"Name=login.y", "Value=6", ENDITEM,
LAST);
web_submit_data:
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=../favicon.ico", "Referer=", ENDITEM,
LAST);
web_reg_find("text=welcome",
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=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=115832.473309032fQfiVDcpitfiDDDDDfHtipHQHAHf", ENDITEM,
"Name=username", "Value=alex", ENDITEM,
"Name=password", "Value=30761234", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=54", ENDITEM,
"Name=login.y", "Value=14", ENDITEM,
LAST);
Thanks for All of you!
|
|