lr出现Error -27298: The "Name" argument is specified more than once
录制了一个发贴的脚本用户名,密码,和发贴标题,内容设置了参数化,回放了5次一直是成功的。但是后来就不行了,一直报:Action.c(91): Error -27298: The "Name" argument (number 27) is specified more than once附上脚本:
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;
}
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);
你看你title,ENDITEM前面漏了什么?
建议碰到问题多自己调试,:lol
我今天碰到跟你一样的问题了。 在线坐等大神的指导 自己顶 o06v90o 发表于 2015-12-7 16:59
ITEMDATA,
"Name=id", "Value=", ENDITEM,
"Name=topicType", "Valu ...
是个 逗号吗?(,)这个是吧? o06v90o 发表于 2015-12-7 16:59
ITEMDATA,
"Name=id", "Value=", ENDITEM,
"Name=topicType", "Valu ...
关于这个脚本我上次还问了一位大神级别的人,她说是可能是我们开发调了代码,所以才这样 该问题已解决,谢谢 o06v90o o06v90o 发表于 2015-12-7 16:59
ITEMDATA,
"Name=id", "Value=", ENDITEM,
"Name=topicType", "Valu ...
非常感谢啊,问题已经解决 了,是你说的这样,我编译时没报错,就以为语法没问题
页:
[1]