|
4#
楼主 |
发表于 2013-8-8 17:37:53
|
只看该作者
你检查一下脚本是否有用户验证的部分!
地壳 发表于 2013-8-8 17:26
Action()
{
web_url("WebTours",
"URL=http://localhost:1080/WebTours",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time(9);
web_submit_form("login.pl",
"Snapshot=t2.inf",
ITEMDATA,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=login.x", "Value=42", ENDITEM,
"Name=login.y", "Value=7", ENDITEM,
LAST);
lr_start_transaction("NewTransaction");
web_image("Search Flights Button",
"Alt=Search Flights Button",
"Snapshot=t3.inf",
LAST);
lr_think_time(4);
web_submit_form("reservations.pl",
"Snapshot=t4.inf",
ITEMDATA,
"Name=depart", "Value=Denver", ENDITEM,
"Name=departDate", "Value=08/09/2013", ENDITEM,
"Name=arrive", "Value=Los Angeles", ENDITEM,
"Name=returnDate", "Value=08/10/2013", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=roundtrip", "Value=<OFF>", ENDITEM,
"Name=seatPref", "Value={seat}", ENDITEM,
"Name=seatType", "Value=Coach", ENDITEM,
"Name=findFlights.x", "Value=50", ENDITEM,
"Name=findFlights.y", "Value=5", ENDITEM,
LAST);
web_submit_form("reservations.pl_2",
"Snapshot=t5.inf",
ITEMDATA,
"Name=outboundFlight", "Value=030;251;08/09/2013", ENDITEM,
"Name=reserveFlights.x", "Value=33", ENDITEM,
"Name=reserveFlights.y", "Value=7", ENDITEM,
LAST);
lr_end_transaction("NewTransaction", LR_AUTO);
lr_think_time(9);
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=12345678", ENDITEM,
"Name=expDate", "Value=05/10", ENDITEM,
"Name=saveCC", "Value=<OFF>", ENDITEM,
"Name=buyFlights.x", "Value=41", ENDITEM,
"Name=buyFlights.y", "Value=9", ENDITEM,
LAST);
web_image("Itinerary Button",
"Alt=Itinerary Button",
"Snapshot=t7.inf",
LAST);
web_image("SignOff Button",
"Alt=SignOff Button",
"Snapshot=t8.inf",
LAST);
lr_output_message("The filght was booked");
return 0;
} |
|