录制订票时,关联参数没找到
来源:2-8 WebTours性能脚本开发2

慕筱汐
2018-01-18
错误提示:
Find_Flight.c(16): Notify: Transaction "选择航班" started.
Find_Flight.c(20): Registering web_reg_save_param_ex was successful [MsgId: MMSG-26390]
Find_Flight.c(29): Notify: Parameter Substitution: parameter "depart" = "Denver"
Find_Flight.c(29): Notify: Parameter Substitution: parameter "departDate" = "19/01"
Find_Flight.c(29): Notify: Parameter Substitution: parameter "arrive" = "Zurich"
Find_Flight.c(29): Notify: Parameter Substitution: parameter "returnDate" = "18/01"
Find_Flight.c(29): Notify: Parameter Substitution: parameter "seatPref" = "Aisle"
Find_Flight.c(29): Notify: Parameter Substitution: parameter "seatType" = "First"
Find_Flight.c(29): Submitting form to "http://127.0.0.1:1080/WebTours/reservations.pl", Target Frame="" [MsgId: MMSG-27978]
Find_Flight.c(29): Notify: Saving Parameter "CorrelationParameter_1 = ".
Find_Flight.c(29): Error -35061: No match found for the requested parameter "CorrelationParameter_1". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 10240 bytes, use web_set_max_html_param_len to increase the parameter size [MsgId: MERR-35061]
Find_Flight.c(29): web_submit_form("reservations.pl") highest severity level was "ERROR", 713 body bytes, 252 header bytes [MsgId: MMSG-26388]
Find_Flight.c(29): Notify: Transaction "选择航班" ended with "Fail" status (Duration: 0.3945 Wasted Time: 0.0149).
login()
{
web_set_max_html_param_len("10240");
/* Registering parameter(s) from source task id 17
// {WCSParam2} = "122825.257837181zDVHictpcDHQAzpQtfc"
// */
web_reg_save_param("WCSParam2",
"LB/IC=userSession value=",
"RB/IC=>",
"Ord=1",
"Search=Body",
"RelFrameId=1.2.1",
LAST);
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time(5);
web_reg_find("Text={username}",
LAST);
lr_start_transaction("登录");
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=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value={WCSParam2}", ENDITEM,
"Name=username", "Value={username}", ENDITEM,
"Name=password", "Value=123456", ENDITEM,
"Name=JSFormSubmit", "Value=on", ENDITEM,
"Name=login.x", "Value=54", ENDITEM,
"Name=login.y", "Value=6", ENDITEM,
LAST);
lr_end_transaction("登录",LR_AUTO);
web_add_cookie("MC1=GUID=3d17a38c3ac34271b47af0c264064082&HASH=3d17&LV=201712&V=4&LU=1514522043332; DOMAIN=ie9cvlist.ie.microsoft.com");
web_add_cookie("MUID=0C87A7BAEE5F64C02E83ACDDEA5F62C7; DOMAIN=ie9cvlist.ie.microsoft.com");
web_add_cookie("MSFPC=ID=3d17a38c3ac34271b47af0c264064082&CS=3&LV=201712&V=1; DOMAIN=ie9cvlist.ie.microsoft.com");
web_add_cookie("A=I&I=AxUFAAAAAADZBwAAZPGB0TpBQ0e7eK2d/nzvNw!!&V=4; DOMAIN=ie9cvlist.ie.microsoft.com");
web_add_cookie("__CT_Data=ckp=tld&dm=microsoft.com; DOMAIN=ie9cvlist.ie.microsoft.com");
lr_think_time(5);
web_url("IE9CompatViewList.xml",
"URL=http://ie9cvlist.ie.microsoft.com/IE9CompatViewList.xml",
"Resource=0",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTML",
LAST);
return 0;
}
web_reg_save_param_ex(
"ParamName=CorrelationParameter_1",
"LB=outboundFlight value=",
"RB=checked ",
SEARCH_FILTERS,
"Scope=Body",
"RequestUrl=*/reservations.pl*",
LAST);
web_submit_form("reservations.pl",
"Snapshot=t5.inf",
ITEMDATA,
"Name=depart", "Value={depart}", ENDITEM,
"Name=departDate", "Value={departDate}/2018", ENDITEM,
"Name=arrive", "Value={arrive}", ENDITEM,
"Name=returnDate", "Value={returnDate}/2018", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=roundtrip", "Value=<OFF>", ENDITEM,
"Name=seatPref", "Value={seatPref}", ENDITEM,
"Name=seatType", "Value={seatType}", ENDITEM,
"Name=findFlights.x", "Value=59", ENDITEM,
"Name=findFlights.y", "Value=10", ENDITEM,
LAST);
lr_end_transaction("选择航班", LR_AUTO);
select_Flight()
{
lr_think_time(5);
lr_start_transaction("选择飞机");
web_submit_data("reservations.pl_2",
"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",
"Snapshot=t6.inf",
"Mode=HTML",
ITEMDATA,
"Name=outboundFlight", "Value={CorrelationParameter_1}", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=advanceDiscount", "Value=0", ENDITEM,
"Name=seatType", "Value={seatType}", ENDITEM,
"Name=seatPref", "Value={seatPref}", ENDITEM,
"Name=reserveFlights.x", "Value=55", ENDITEM,
"Name=reserveFlights.y", "Value=12", ENDITEM,
LAST);
lr_think_time(5);
web_submit_form("reservations.pl_3",
"Snapshot=t7.inf",
ITEMDATA,
"Name=firstName", "Value=san", ENDITEM,
"Name=lastName", "Value=zhang", ENDITEM,
"Name=address1", "Value=china,guangdong,shenzhen", ENDITEM,
"Name=address2", "Value=0755", ENDITEM,
"Name=pass1", "Value=san zhang", ENDITEM,
"Name=creditCard", "Value=1234567890", ENDITEM,
"Name=expDate", "Value=", ENDITEM,
"Name=saveCC", "Value=<OFF>", ENDITEM,
"Name=buyFlights.x", "Value=62", ENDITEM,
"Name=buyFlights.y", "Value=9", ENDITEM,
LAST);
lr_end_transaction("选择飞机",LR_AUTO);
return 0;
}
1回答
-
linda888
2018-01-25
第二个关联没找到,就是航班信息的那个,1、确认左边界与右边界是否正确。我看checked后面有个空格。这对还是不对?中间是否有空格。2、确认返回的信息与使用的是否一致。不同不可以一起放在一个参数中,要分开。
00
相似问题