|
2#
楼主 |
发表于 2016-4-26 16:53:21
|
只看该作者
但是这个错误,我在录制的脚本中还未对脚本进行参数化。
以下是录制的参数:
Action()
{
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t27.inf",
"Mode=HTML",
LAST);
lr_think_time(17);
web_submit_form("login.pl",
"Snapshot=t28.inf",
ITEMDATA,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=login.x", "Value=0", ENDITEM,
"Name=login.y", "Value=0", ENDITEM,
LAST);
web_image("Search Flights Button",
"Alt=Search Flights Button",
"Snapshot=t29.inf",
LAST);
lr_think_time(6);
web_submit_form("reservations.pl",
"Snapshot=t30.inf",
ITEMDATA,
"Name=depart", "Value=Denver", ENDITEM,
"Name=departDate", "Value=04/27/2016", ENDITEM,
"Name=arrive", "Value=Frankfurt", ENDITEM,
"Name=returnDate", "Value=04/28/2016", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=roundtrip", "Value=<OFF>", ENDITEM,
"Name=seatPref", "Value=Aisle", ENDITEM,
"Name=seatType", "Value=Coach", ENDITEM,
"Name=findFlights.x", "Value=67", ENDITEM,
"Name=findFlights.y", "Value=10", ENDITEM,
LAST);
web_submit_form("reservations.pl_2",
"Snapshot=t31.inf",
ITEMDATA,
"Name=outboundFlight", "Value=011;343;04/27/2016", ENDITEM,
"Name=reserveFlights.x", "Value=44", ENDITEM,
"Name=reserveFlights.y", "Value=7", ENDITEM,
LAST);
lr_think_time(7);
web_submit_form("reservations.pl_3",
"Snapshot=t32.inf",
ITEMDATA,
"Name=firstName", "Value=Joseph", ENDITEM,
"Name=lastName", "Value=Marshall", ENDITEM,
"Name=address1", "Value=234 Willow Drive", ENDITEM,
"Name=address2", "Value=San Jose/CA/94085", ENDITEM,
"Name=pass1", "Value=Joseph Marshall", ENDITEM,
"Name=creditCard", "Value=12345678", ENDITEM,
"Name=expDate", "Value=06/10", ENDITEM,
"Name=saveCC", "Value=<OFF>", ENDITEM,
"Name=buyFlights.x", "Value=49", ENDITEM,
"Name=buyFlights.y", "Value=2", ENDITEM,
LAST);
lr_think_time(29);
web_image("SignOff Button",
"Alt=SignOff Button",
"Snapshot=t33.inf",
LAST);
return 0;
} |
|