|
Action()
{
web_url("mercuryWebTours",
"URL=http://127.0.0.1:1080/mercuryWebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time(11);
lr_start_transaction("login");
lr_rendezvous("login");
web_submit_form("login.pl",
"Snapshot=t2.inf",
ITEMDATA,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=login.x", "Value=53", ENDITEM,
"Name=login.y", "Value=10", ENDITEM,
LAST);
lr_think_time(4);
lr_end_transaction("login", LR_AUTO);
lr_start_transaction("search_flight");
lr_rendezvous("search_flight");
web_image("Search Flights Button",
"Alt=Search Flights Button",
"Snapshot=t3.inf",
LAST);
lr_think_time(4);
lr_end_transaction("search_flight", LR_AUTO);
web_submit_form("reservations.pl",
"Snapshot=t4.inf",
ITEMDATA,
"Name=depart", "Value={origin}", ENDITEM,
"Name=departDate", "Value=10/30/2007", ENDITEM,
"Name=arrive", "Value=Los Angeles", ENDITEM,
"Name=returnDate", "Value=10/31/2007", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=roundtrip", "Value=<OFF>", ENDITEM,
"Name=seatPref", "Value=None", ENDITEM,
"Name=seatType", "Value=Coach", ENDITEM,
"Name=findFlights.x", "Value=52", ENDITEM,
"Name=findFlights.y", "Value=10", ENDITEM,
LAST);
lr_start_transaction("book_flight");
lr_rendezvous("book_flight");
web_submit_form("reservations.pl_2",
"Snapshot=t5.inf",
ITEMDATA,
"Name=outboundFlight", "Value=030;251;10/30/2007", ENDITEM,
"Name=reserveFlights.x", "Value=40", ENDITEM,
"Name=reserveFlights.y", "Value=14", ENDITEM,
LAST);
lr_think_time(4);
lr_end_transaction("book_flight", LR_AUTO);
web_submit_form("reservations.pl_3",
"Snapshot=t6.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=123456789", ENDITEM,
"Name=expDate", "Value=", ENDITEM,
"Name=saveCC", "Value=<OFF>", ENDITEM,
"Name=buyFlights.x", "Value=30", ENDITEM,
"Name=buyFlights.y", "Value=5", ENDITEM,
LAST);
web_image_check("web_image_check",
"Src=splash_flightconfirm.gif",
LAST);
lr_start_transaction("check_itinerary");
web_image("Itinerary Button",
"Alt=Itinerary Button",
"Snapshot=t7.inf",
LAST);
lr_end_transaction("check_itinerary", LR_AUTO);
lr_start_transaction("logoff");
lr_rendezvous("logoff");
web_image("SignOff Button",
"Alt=SignOff Button",
"Snapshot=t8.inf",
LAST);
lr_end_transaction("logoff", LR_AUTO);
lr_output_message("The flight was booked");
return 0;
}
------------------------------------------------------------------------------------------------------
这个脚本迭代4次 第一次可以通过没错误。第2次到web_submit_form("reservations.pl_2",
"Snapshot=t5.inf",
ITEMDATA,
"Name=outboundFlight", "Value=030;251;10/30/2007", ENDITEM,
"Name=reserveFlights.x", "Value=40", ENDITEM,
"Name=reserveFlights.y", "Value=14", ENDITEM,
LAST);
lr_think_time(4);
这里就过不去了, 说错误-27979 找不到请求表单。什么问题啊? 我才开始接触这个 |
|