|
本帖最后由 liuleidelang 于 2011-12-6 15:52 编辑
LR自带flights例子, 关联后出错。 提示如下:
Action.c(10): Error -26377: No match found for the requested parameter "outboundvalue". 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(10): web_url("welcome.pl") highest severity level was "ERROR", 22047 body bytes, 1682 header bytes [MsgId: MMSG-26388]
脚本如下:
Action()
{
web_set_max_html_param_len("1024");
web_reg_save_param("outboundvalue",
"LB=outboundFlight value=","RB=", LAST);
lr_start_transaction("选择起点和终点");
/*lr_think_time(19);*/
web_url("welcome.pl",
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?page=search",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",
"Snapshot=t9.inf",
"Mode=HTML",
LAST);
web_url("FormDateUpdate.class",
"URL=http://127.0.0.1:1080/WebTours/FormDateUpdate.class",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTML",
LAST);
web_url("CalSelect.class",
"URL=http://127.0.0.1:1080/WebTours/CalSelect.class",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTML",
LAST);
web_url("Calendar.class",
"URL=http://127.0.0.1:1080/WebTours/Calendar.class",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTML",
LAST);
web_submit_data("reservations.pl",
"Action=http://127.0.0.1:1080/WebTours/reservations.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/reservations.pl?page=welcome",
"Snapshot=t10.inf",
"Mode=HTML",
ITEMDATA,
"Name=advanceDiscount", "Value=0", ENDITEM,
"Name=depart", "Value={depart}", ENDITEM,
"Name=departDate", "Value={departdate}", ENDITEM,
"Name=arrive", "Value={arrive}", ENDITEM,
"Name=returnDate", "Value=12/08/2011", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=seatPref", "Value=None", ENDITEM,
"Name=seatType", "Value=Coach", ENDITEM,
"Name=.cgifields", "Value=roundtrip", ENDITEM,
"Name=.cgifields", "Value=seatType", ENDITEM,
"Name=.cgifields", "Value=seatPref", ENDITEM,
"Name=findFlights.x", "Value=39", ENDITEM,
"Name=findFlights.y", "Value=14", ENDITEM,
LAST);
lr_end_transaction("选择起点和终点", LR_AUTO);
lr_start_transaction("选择航班");
/*lr_think_time(61);*/
web_submit_form("reservations.pl_2",
"Snapshot=t11.inf",
ITEMDATA,
"Name=outboundFlight", "Value={outboundvalue}", ENDITEM,
"Name=reserveFlights.x", "Value=42", ENDITEM,
"Name=reserveFlights.y", "Value=9", ENDITEM,
LAST);
lr_end_transaction("选择航班", LR_AUTO);
lr_start_transaction("填写信息");
/*lr_think_time(48);*/
web_submit_form("reservations.pl_3",
"Snapshot=t12.inf",
ITEMDATA,
"Name=firstName", "Value={firstname}", ENDITEM,
"Name=lastName", "Value=t", ENDITEM,
"Name=address1", "Value=t", ENDITEM,
"Name=address2", "Value=t", ENDITEM,
"Name=pass1", "Value=t", ENDITEM,
"Name=creditCard", "Value={creditcard}", ENDITEM,
"Name=expDate", "Value=12/11", ENDITEM,
"Name=saveCC", "Value=<OFF>", ENDITEM,
"Name=buyFlights.x", "Value=47", ENDITEM,
"Name=buyFlights.y", "Value=7", ENDITEM,
LAST);
/*lr_think_time(8);*/
web_submit_form("reservations.pl_4",
"Snapshot=t13.inf",
ITEMDATA,
"Name=Book Another.x", "Value=25", ENDITEM,
"Name=Book Another.y", "Value=10", ENDITEM,
LAST);
lr_end_transaction("填写信息", LR_AUTO);
return 0;
} |
|