|
vuser_init()
{
int a;
web_url("system",
"URL=http://192.168.1.9:28080/UserManagement/system/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=../img/log_back.gif", ENDITEM,
"Url=../img/log_topbg.gif", ENDITEM,
LAST);
web_submit_form("adminlogin.action",
"Snapshot=t2.inf",
ITEMDATA,
"Name=username", "Value=admin", ENDITEM,
"Name=password", "Value=admin1", ENDITEM,
EXTRARES,
"Url=img/header-bg.gif", ENDITEM,
"Url=img/logo.gif", ENDITEM,
"Url=img/header-bg-img.gif", ENDITEM,
"Url=img/menu-bg.gif", ENDITEM,
"Url=img/FrameBg.gif", ENDITEM,
"Url=images/three_0.gif", ENDITEM,
"Url=images/three_0a.gif", ENDITEM,
"Url=img/menu-bg.jpg", ENDITEM,
LAST);
a=web_submit_form("adminlogin.action",
"Snapshot=t2.inf",
ITEMDATA,
"Name=username", "Value=admin", ENDITEM,
"Name=password", "Value=admin1", ENDITEM,
EXTRARES,
"Url=img/header-bg.gif", ENDITEM,
"Url=img/logo.gif", ENDITEM,
"Url=img/header-bg-img.gif", ENDITEM,
"Url=img/menu-bg.gif", ENDITEM,
"Url=img/FrameBg.gif", ENDITEM,
"Url=images/three_0.gif", ENDITEM,
"Url=images/three_0a.gif", ENDITEM,
"Url=img/menu-bg.jpg", ENDITEM,
LAST);
if (a==LR_FAIL) {
lr_error_message("error");
return -1;
}
else
{
lr_output_message("登录成功");
return 0;
}
}
这个是个登录的脚本,我想测试下是不是能登录成功,写了这个脚本,但是报错了不知道为什么,这个是在init中录制的因为真正想测试的是查询报错信息如下
user_init.c(40): Error -27979: Requested form not found [MsgId: MERR-27979]
vuser_init.c(40): web_submit_form("adminlogin.action") highest severity level was "ERROR", 0 body bytes, 0 header bytes [MsgId: MMSG-26388]
不知道是什么问题,请各位同行给予指点
如果大家觉得我写的不对请指出,我主要就是想判断下是否登录成功了,然后进行查询操作 |
|