|
录制LR自带的飞机订票系统,脚本如下:
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t9.inf",
"Mode=HTTP",
ITEMDATA, "Name=userSession", "Value=105270.948481166ftVtiHtptVcfDctiQpctztHf", ENDITEM,
"Name=username", "Value=admin", ENDITEM,
"Name=password", "Value=admin", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=28", ENDITEM,
"Name=login.y", "Value=12", ENDITEM,
LAST);
我设置了关联,把"Name=userSession", "Value=105270.948481166ftVtiHtptVcfDctiQpctztHf"的value用参数Sessionid代替了,关联之后的脚本如下:
web_reg_save_param("Sessionid","LB=userSession","RB=>","Search=Body",LAST);
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t9.inf",
"Mode=HTTP",
ITEMDATA,
"Name=userSession", "Value={Sessionid}", ENDITEM,
"Name=username", "Value=admin", ENDITEM,
"Name=password", "Value=admin", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=53", ENDITEM,
"Name=login.y", "Value=16", ENDITEM,
LAST);
但是回放的时候报错了:Action.c(91): Error -26377: No match found for the requested parameter "Sessionid". 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 [MsgId: MERR-26377]
Action.c(91): web_submit_data("login.pl") highest severity level was "ERROR", 741 body bytes, 225 header bytes [MsgId: MMSG-26388]
请教大家,这是怎么回事呢? |
|