TA的每日心情 | 擦汗 2015-11-11 15:40 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
录制了一个发贴的脚本用户名,密码,和发贴标题,内容设置了参数化,回放了5次一直是成功的。但是后来就不行了,一直报:Action.c(91): Error -27298: The "Name" argument (number 27) is specified more than once [MsgId: MERR-27298]
附上脚本:
lr_think_time(128);
web_submit_data("login",
"Action=http://www.zhx.com/login",
"Method=POST",
"TargetFrame=",
"RecContentType=application/json",
"Referer=http://www.zhx.com/",
"Snapshot=t5.inf",
"Mode=HTML",
ITEMDATA,
//"Name=subjects", "Value={\"000000001\":206,\"8a489d1a46610857014661085c910003\":206,\"8a489d1a4637f67a014660ae9d4a03b2\":206,\"2c9180884f2478a0014f258054a00025\":206,\"2c91808c4f71b897014f73303ddc0002\":102}", ENDITEM,
"Name=username", "Value={username}", ENDITEM,
"Name=password", "Value={password}", ENDITEM,
LAST);
lr_think_time(63);
web_url("www.zhx.com_2",
"URL=http://www.zhx.com/",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.zhx.com/",
"Snapshot=t6.inf",
"Mode=HTML",
LAST);
//web_reg_find("Text=学校吧",
//LAST);
lr_think_time(503);
web_url("学生慧",
"URL=http://www.zhx.com/topic/",
"TargetFrame=_self",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.zhx.com/",
"Snapshot=t7.inf",
"Mode=HTML",
LAST);
lr_think_time(128);
// lr_convert_string_encoding(lr_eval_string("{rdm}"),LR_ENC_SYSTEM_LOCALE,LR_ENC_UTF8 ,"str");
web_url("我要发言",
"URL=http://www.zhx.com/topic/newTopic",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.zhx.com/topic/",
"Snapshot=t8.inf",
"Mode=HTML",
LAST);
lr_think_time(189);
lr_save_string(lr_eval_string("{rdm}"),"a");
lr_start_transaction("提交");
web_submit_data("newTopic",
"Action=http://www.zhx.com/topic/newTopic",
"Method=POST",
"TargetFrame=",
"RecContentType=application/json",
"Referer=http://www.zhx.com/topic/newTopic",
"Snapshot=t9.inf",
"Mode=HTML",
ITEMDATA,
"Name=id", "Value=", ENDITEM,
"Name=topicType", "Value=", ENDITEM,
"Name=topicId", "Value=", ENDITEM,
"Name=videoUrl", "Value=", ENDITEM,
"Name=videoCode", "Value=", ENDITEM,
"Name=title", "Value={a}" ENDITEM,
"Name=content", "Value={a}", ENDITEM,
"Name=jingState", "Value=0", ENDITEM,
LAST);
lr_think_time(127);
web_reg_find("Text={a}",
"SaveCount=Count",
"Search=Body",
LAST);
web_url("56496f00e4b0920e0170320f",
"URL=http://www.zhx.com/topic/56496f00e4b0920e0170320f",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.zhx.com/topic/newTopic",
"Snapshot=t10.inf",
"Mode=HTML",
EXTRARES,
"Url=getComments?topicId=56496f00e4b0920e0170320f", ENDITEM,
"Url=getTopComments?topicId=56496f00e4b0920e0170320f", ENDITEM,
"Url=../user/message/checkUnread", ENDITEM,
LAST);
if(atoi( lr_eval_string("{Count}"))>0){
lr_log_message("发帖子内容:用户名-- %s,密码--%s,内容--%s", lr_eval_string("username"),lr_eval_string("password"),lr_eval_string( "{a}" ));
lr_end_transaction("提交", LR_AUTO);
}else{
lr_output_message("Log on fail");
lr_end_transaction("提交", LR_FAIL);
}
return 0;
}
|
|