|
各位大狭,请帮忙解答一下,如标题,情况是这样的,我录制了一个B/S结构的脚本,用户名与密码都参数化了(该系统一个用户在同一时间只允许一个登录),执行脚本是成功能,但发现界面出现的全是登录页面,为什么呢?如下是我录制的脚本,请各位帮忙看看,小女子在此脆谢了,我的MSN:cxz1188@163.COM
Action()
{
web_url("login.do",
"URL=http://localhost:8081/charging/login.do",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_rendezvous("登录");
lr_start_transaction("登录");
lr_think_time(40);
web_submit_form("login.do;jsessionid=B5B3505B0391E230C99AFDE30559E08A",
"Snapshot=t2.inf",
ITEMDATA,
"Name=busiBean.code", "Value={name}", ENDITEM,
"Name=busiBean.password", "Value={password}", ENDITEM,
LAST);
lr_end_transaction("登录",LR_AUTO);
lr_start_transaction("登录");
web_submit_form("login.do_2",
"Snapshot=t3.inf",
ITEMDATA,
"Name=busiBean.code", "Value=004", ENDITEM,
"Name=busiBean.password", "Value=", ENDITEM,
EXTRARES,
"Url=image/join.gif", "Referer=http://localhost:8081/charging/charging/tree.jsp", ENDITEM,
"Url=image/page.gif", "Referer=http://localhost:8081/charging/charging/tree.jsp", ENDITEM,
"Url=image/joinbottom.gif", "Referer=http://localhost:8081/charging/charging/tree.jsp", ENDITEM,
"Url=image/folder.gif", "Referer=http://localhost:8081/charging/charging/tree.jsp", ENDITEM,
LAST);
lr_end_transaction("登录",LR_AUTO);
lr_rendezvous("车辆收费");
lr_start_transaction("车辆收费");
web_add_cookie("csd=11; DOMAIN=localhost");
lr_think_time(21);
web_url("chargingReg.do",
"URL=http://localhost:8081/charging/charging/common/chargingReg.do",
"Resource=0",
"RecContentType=text/html",
"Referer=http://localhost:8081/charging/charging/tree.jsp",
"Snapshot=t4.inf",
"Mode=HTML",
EXTRARES,
"Url=/charging/image/submit.gif", ENDITEM,
LAST);
lr_end_transaction("车辆收费",LR_AUTO);
lr_start_transaction("车牌");
lr_think_time(38);
web_submit_data("searchVeh.do",
"Action=http://localhost:8081/charging/charging/vehicleNormal/searchVeh.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:8081/charging/charging/common/chargingReg.do",
"Snapshot=t5.inf",
"Mode=HTML",
ITEMDATA,
"Name=paraBean.operType", "Value=S", ENDITEM,
"Name=paraBean.searchVeh_flag", "Value=", ENDITEM,
"Name=busiBean.payor", "Value=", ENDITEM,
"Name=busiBean.vehNo", "Value=", ENDITEM,
"Name=busiBean.vehType", "Value=", ENDITEM,
"Name=busiBean.vehDeadline", "Value=0", ENDITEM,
"Name=busiBean.vehTonlevel", "Value=0.0", ENDITEM,
"Name=busiBean.lastDeadline", "Value=", ENDITEM,
"Name=busiBean.wayNum", "Value=0", ENDITEM,
"Name=busiBean.billNo", "Value=02263352", ENDITEM,
"Name=busiBean.payType", "Value=正常收费", ENDITEM,
"Name=busiBean.deadline_year", "Value=2005", ENDITEM,
"Name=busiBean.deadline_month", "Value=01", ENDITEM,
"Name=paraBean.refVehNo", "Value=B黑M00982", ENDITEM,
LAST);
lr_end_transaction("车牌",LR_AUTO);
lr_start_transaction("车牌1");
lr_think_time(25);
web_submit_data("searchVeh.do_2",
"Action=http://localhost:8081/charging/charging/vehicleNormal/searchVeh.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:8081/charging/charging/vehicleNormal/searchVeh.do",
"Snapshot=t6.inf",
"Mode=HTML",
ITEMDATA,
"Name=paraBean.operType", "Value=S", ENDITEM,
"Name=paraBean.searchVeh_flag", "Value=", ENDITEM,
"Name=busiBean.payor", "Value=绥化地区线务局", ENDITEM,
"Name=busiBean.vehNo", "Value=B黑M00982", ENDITEM,
"Name=busiBean.vehType", "Value=客货", ENDITEM,
"Name=busiBean.vehDeadline", "Value=0", ENDITEM,
"Name=busiBean.vehTonlevel", "Value=1.5", ENDITEM,
"Name=busiBean.lastDeadline", "Value=2005-01-31", ENDITEM,
"Name=busiBean.wayNum", "Value=1", ENDITEM,
"Name=busiBean.billNo", "Value=02263352", ENDITEM,
"Name=busiBean.payType", "Value=正常收费", ENDITEM,
"Name=busiBean.deadline_year", "Value=2005", ENDITEM,
"Name=busiBean.deadline_month", "Value=01", ENDITEM,
"Name=paraBean.refVehNo", "Value=B黑M01110", ENDITEM,
LAST);
lr_end_transaction("车牌1",LR_AUTO);
lr_rendezvous("保存");
lr_start_transaction("保存");
lr_think_time(15);
web_submit_data("saveVehFee.do",
"Action=http://localhost:8081/charging/charging/vehicleNormal/saveVehFee.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:8081/charging/charging/vehicleNormal/searchVeh.do",
"Snapshot=t7.inf",
"Mode=HTML",
ITEMDATA,
"Name=paraBean.operType", "Value=I", ENDITEM,
"Name=paraBean.searchVeh_flag", "Value=", ENDITEM,
"Name=busiBean.payor", "Value=黑龙江泰华医药有限公司", ENDITEM,
"Name=busiBean.vehNo", "Value=B黑M01110", ENDITEM,
"Name=busiBean.vehType", "Value=江西五十铃", ENDITEM,
"Name=busiBean.vehDeadline", "Value=0", ENDITEM,
"Name=busiBean.vehTonlevel", "Value=1.5", ENDITEM,
"Name=busiBean.lastDeadline", "Value=2004-06-30", ENDITEM,
"Name=busiBean.wayNum", "Value=1", ENDITEM,
"Name=busiBean.billNo", "Value=02263352", ENDITEM,
"Name=busiBean.payType", "Value=正常收费", ENDITEM,
"Name=busiBean.deadline_year", "Value=2005", ENDITEM,
"Name=busiBean.deadline_month", "Value=01", ENDITEM,
"Name=paraBean.refVehNo", "Value=B黑M01110", ENDITEM,
LAST);
lr_end_transaction("保存",LR_AUTO);
return 0;
} |
|