|
3#
楼主 |
发表于 2009-8-20 10:30:08
|
只看该作者
回复 2# 的帖子
vuser_init()
{
web_add_cookie("userkey=13600086486; DOMAIN=192.168.1.251");
web_url("default.jsp",
"URL=http://192.168.1.251:8080/wap/default.jsp",
"Resource=1",
"RecContentType=text/vnd.wap.wml",
"Referer=",
"Snapshot=t1.inf",
LAST);
return 0;
}
intologin()
{
lr_think_time(27);
web_url("login.jsp",
"URL=http://192.168.1.251:8080/wap/login.jsp",
"Resource=1",
"RecContentType=text/vnd.wap.wml",
"Referer=",
"Snapshot=t2.inf",
LAST);
return 0;
}
submitlogin()
{
lr_think_time(18);
lr_rendezvous("loginrendezvous");
lr_start_transaction("submitlogin");
web_submit_data("wapaction.wml",
"Action=http://192.168.1.251:8080/wapaction.wml",
"Method=POST",
"RecContentType=text/vnd.wap.wml",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=action", "Value=100", ENDITEM,
"Name=username", "Value={username}", ENDITEM,
"Name=password", "Value=123456", ENDITEM,
LAST);
web_reg_find("text=欢迎您!","savecount=a","search=body",LAST);
lr_end_transaction("submitlogin",LR_AUTO);
lr_log_message("用户名=%s",lr_eval_string("{username}"));
if(strcmp(lr_eval_string("{a}"),"0")==0)
lr_log_message("登陆失败!");
else
lr_log_message("登陆成功!");
return 0;
}
vuser_end()
{
web_url("wapaction.wml_2",
"URL=http://192.168.1.251:8080/wapaction.wml?action=101",
"Resource=1",
"RecContentType=text/vnd.wap.wml",
"Referer=",
"Snapshot=t4.inf",
LAST);
return 0;
}
这是我的脚本,您帮忙看一下
先谢了 |
|