Loadrunner关联的错误,请大家帮忙看看,在线等待
一,脚本部分web_reg_save_param("code","LB=Name=","RB=Box2","search=Body",LAST);
web_submit_form("Default.aspx",
"Snapshot=t2.inf",
ITEMDATA,
"Name=T_userid", "Value=dongql", ENDITEM,
"Name=T_pwd", "Value=123456", ENDITEM,
"Name=TextBox2", "Value={code}", ENDITEM,
"Name=TextBox3", "Value=", ENDITEM,
"Name=tbVer", "Value=", ENDITEM,
"Name=Submit.x", "Value=35", ENDITEM,
"Name=Submit.y", "Value=5", ENDITEM,
LAST);
二、replay日志部分
Action.c(17): Error -26377: No match found for the requested parameter "code". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size
Action.c(17): Notify: Saving Parameter "code = "
Action.c(17): web_submit_form("Default.aspx") highest severity level was "ERROR", 10254 body bytes, 552 header bytes
Ending action Action.
Ending iteration 1. 出现这个错误的原因,90%是位置放错了。你能不能把详细代码贴点出来 Action()
{
web_url("oa.szlanyou.com",
"URL=http://oa.szlanyou.com/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time(3);
web_reg_save_param("code","LB=Name=","RB=Box2","search=Body",LAST);
web_submit_form("Default.aspx",
"Snapshot=t2.inf",
ITEMDATA,
"Name=T_userid", "Value=dongql", ENDITEM,
"Name=T_pwd", "Value=123456", ENDITEM,
"Name=TextBox2", "Value={code}", ENDITEM,
"Name=TextBox3", "Value=", ENDITEM,
"Name=tbVer", "Value=", ENDITEM,
"Name=Submit.x", "Value=35", ENDITEM,
"Name=Submit.y", "Value=5", ENDITEM,
LAST);
lr_output_message("校验码:",lr_eval_string("{code}"));
web_url("main.aspx",
"URL=http://oa.szlanyou.com/main.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=/webctrl_client/1_0/treeview.htc", "Referer=", ENDITEM,
"Url=/image/1.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
"Url=/image/7.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
"Url=/image/2.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
"Url=/image/3.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
"Url=/image/4.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
"Url=/image/5.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
"Url=/image/6.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
"Url=/image/k1_02.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
"Url=/image/k1_01.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
"Url=/image/k1_03.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
"Url=/image/k1_04.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
"Url=/image/k1_05.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
LAST);
return 0;
}
这是全部的代码了 校验码是在访问http://oa.szlanyou.com/的时候返回的吗?
改成这样试试:
Action()
{
web_reg_save_param("code","LB=Name=","RB=Box2","search=Body",LAST);
web_url("oa.szlanyou.com",
"URL=http://oa.szlanyou.com/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time(3);
web_submit_form("Default.aspx",
"Snapshot=t2.inf",
ITEMDATA,
"Name=T_userid", "Value=dongql", ENDITEM,
"Name=T_pwd", "Value=123456", ENDITEM,
"Name=TextBox2", "Value={code}", ENDITEM,
"Name=TextBox3", "Value=", ENDITEM,
"Name=tbVer", "Value=", ENDITEM,
"Name=Submit.x", "Value=35", ENDITEM,
"Name=Submit.y", "Value=5", ENDITEM,
LAST);
lr_output_message("校验码:",lr_eval_string("{code}"));
web_url("main.aspx",
"URL=http://oa.szlanyou.com/main.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=/webctrl_client/1_0/treeview.htc", "Referer=", ENDITEM,
"Url=/image/1.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
"Url=/image/7.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
"Url=/image/2.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
"Url=/image/3.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
"Url=/image/4.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
"Url=/image/5.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
"Url=/image/6.gif", "Referer=http://oa.szlanyou.com/left.aspx", ENDITEM,
"Url=/image/k1_02.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
"Url=/image/k1_01.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
"Url=/image/k1_03.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
"Url=/image/k1_04.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
"Url=/image/k1_05.gif", "Referer=http://oa.szlanyou.com/top.aspx", ENDITEM,
LAST);
return 0;
} 很明显是放错位置了 校验码是在访问http://oa.szlanyou.com的时候产生的,我试了PrefTest的方法,但是仍然报错,错误如下,请大家帮忙来看看:
Action.c(5): Error -26377: No match found for the requested parameter "code". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size
Action.c(5): Notify: Saving Parameter "code = "
Action.c(5): web_url("oa.szlanyou.com") highest severity level was "ERROR", 117279 body bytes, 4526 header bytes
页:
[1]