|
斐哥,帮我看下这段脚本,
vuser_init()
{
int status;//定义变量用于判断登陆是否成功
lr_start_transaction("login");
web_add_cookie("userName=0361; DOMAIN=222.189.216.110");
web_url("login.jsp",
"URL=http://222.189.216.110:12001/wfms/login.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=framework-resources/images/login_bg.gif", ENDITEM,
"Url=framework-resources/images/login.png", ENDITEM,
"Url=framework-resources/images/login_button.gif", ENDITEM,
LAST);
web_add_cookie("s_pwd=e5332fe25060086ed2b14293e6fc65f1; DOMAIN=222.189.216.110");
web_add_cookie("logined=logined; DOMAIN=222.189.216.110");
web_submit_form("login.jsp_2",
"Snapshot=t2.inf",
ITEMDATA,
"Name=userName", "Value={loginname}", ENDITEM,
"Name=s_Pwd", "Value={pwd}", ENDITEM,
EXTRARES,
"Url=framework-resources/images/title.gif", "Referer=http://222.189.216.110:12001/wfms/top.jsp", ENDITEM,
"Url=framework-resources/images/tableftF.gif", "Referer=http://222.189.216.110:12001/wfms/top.jsp", ENDITEM,
"Url=framework-resources/images/info_line.gif", "Referer=http://222.189.216.110:12001/wfms/info.jsp", ENDITEM,
"Url=framework-resources/images/user_16.gif", "Referer=http://222.189.216.110:12001/wfms/info.jsp", ENDITEM,
"Url=framework-resources/images/tabrightF.gif", "Referer=http://222.189.216.110:12001/wfms/top.jsp", ENDITEM,
"Url=framework-resources/images/info_bg.gif", "Referer=http://222.189.216.110:12001/wfms/info.jsp", ENDITEM,
"Url=framework/sys-resources/images/h_sep_bar_bg.gif", "Referer=http://222.189.216.110:12001/wfms/mid.htm", ENDITEM,
"Url=framework-resources/images/max_16.gif", "Referer=http://222.189.216.110:12001/wfms/info.jsp", ENDITEM,
"Url=framework-resources/images/info_time.gif", "Referer=http://222.189.216.110:12001/wfms/info.jsp", ENDITEM,
"Url=framework-resources/images/main_table_dot.gif", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
"Url=framework-resources/images/main_bar_ico_stay.gif", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
"Url=framework-resources/My97DatePicker/skin/WdatePicker.css", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
"Url=framework-resources/images/main_bg.gif", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
"Url=framework-resources/images/main_bar_bg.gif", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
"Url=framework-resources/images/ico_nav2.gif", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
LAST);
status=web_submit_form("login.jsp_2",
"Snapshot=t2.inf",
ITEMDATA,
"Name=userName", "Value={loginname}", ENDITEM,
"Name=s_Pwd", "Value={pwd}", ENDITEM,
EXTRARES,
"Url=framework-resources/images/title.gif", "Referer=http://222.189.216.110:12001/wfms/top.jsp", ENDITEM,
"Url=framework-resources/images/tableftF.gif", "Referer=http://222.189.216.110:12001/wfms/top.jsp", ENDITEM,
"Url=framework-resources/images/info_line.gif", "Referer=http://222.189.216.110:12001/wfms/info.jsp", ENDITEM,
"Url=framework-resources/images/user_16.gif", "Referer=http://222.189.216.110:12001/wfms/info.jsp", ENDITEM,
"Url=framework-resources/images/tabrightF.gif", "Referer=http://222.189.216.110:12001/wfms/top.jsp", ENDITEM,
"Url=framework-resources/images/info_bg.gif", "Referer=http://222.189.216.110:12001/wfms/info.jsp", ENDITEM,
"Url=framework/sys-resources/images/h_sep_bar_bg.gif", "Referer=http://222.189.216.110:12001/wfms/mid.htm", ENDITEM,
"Url=framework-resources/images/max_16.gif", "Referer=http://222.189.216.110:12001/wfms/info.jsp", ENDITEM,
"Url=framework-resources/images/info_time.gif", "Referer=http://222.189.216.110:12001/wfms/info.jsp", ENDITEM,
"Url=framework-resources/images/main_table_dot.gif", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
"Url=framework-resources/images/main_bar_ico_stay.gif", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
"Url=framework-resources/My97DatePicker/skin/WdatePicker.css", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
"Url=framework-resources/images/main_bg.gif", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
"Url=framework-resources/images/main_bar_bg.gif", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
"Url=framework-resources/images/ico_nav2.gif", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
LAST);
if(status==LR_FAIL)
{
lr_error_message("错误信息:%s","不能正常登陆!");
return -1;
}
lr_end_transaction("login", LR_AUTO);
return 0;
}
=================================================
运行后报这个错
vuser_init.c(49): Error -27979: Requested form not found [MsgId: MERR-27979]
vuser_init.c(49): web_submit_form("login.jsp_2") highest severity level was "ERROR", 0 body bytes, 0 header bytes [MsgId: MMSG-26388]
====================================================
没加这段代码 运行是正确的
status=web_submit_form("login.jsp_2",
"Snapshot=t2.inf",
ITEMDATA,
"Name=userName", "Value={loginname}", ENDITEM,
"Name=s_Pwd", "Value={pwd}", ENDITEM,
EXTRARES,
"Url=framework-resources/images/title.gif", "Referer=http://222.189.216.110:12001/wfms/top.jsp", ENDITEM,
"Url=framework-resources/images/tableftF.gif", "Referer=http://222.189.216.110:12001/wfms/top.jsp", ENDITEM,
"Url=framework-resources/images/info_line.gif", "Referer=http://222.189.216.110:12001/wfms/info.jsp", ENDITEM,
"Url=framework-resources/images/user_16.gif", "Referer=http://222.189.216.110:12001/wfms/info.jsp", ENDITEM,
"Url=framework-resources/images/tabrightF.gif", "Referer=http://222.189.216.110:12001/wfms/top.jsp", ENDITEM,
"Url=framework-resources/images/info_bg.gif", "Referer=http://222.189.216.110:12001/wfms/info.jsp", ENDITEM,
"Url=framework/sys-resources/images/h_sep_bar_bg.gif", "Referer=http://222.189.216.110:12001/wfms/mid.htm", ENDITEM,
"Url=framework-resources/images/max_16.gif", "Referer=http://222.189.216.110:12001/wfms/info.jsp", ENDITEM,
"Url=framework-resources/images/info_time.gif", "Referer=http://222.189.216.110:12001/wfms/info.jsp", ENDITEM,
"Url=framework-resources/images/main_table_dot.gif", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
"Url=framework-resources/images/main_bar_ico_stay.gif", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
"Url=framework-resources/My97DatePicker/skin/WdatePicker.css", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
"Url=framework-resources/images/main_bg.gif", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
"Url=framework-resources/images/main_bar_bg.gif", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
"Url=framework-resources/images/ico_nav2.gif", "Referer=http://222.189.216.110:12001/wfms/main.jsp", ENDITEM,
LAST);
if(status==LR_FAIL)
{
lr_error_message("错误信息:%s","不能正常登陆!");
return -1;
}
加了之后出现这个错,知道原因的话麻烦告知 |
|