|
代码如下:
Action()
{
web_reg_save_param("login1",
"LB=value=",
"RB=>\n",
LAST);
web_url("WebTours",
"URL=http://localhost:1080/WebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t9.inf",
"Mode=HTML",
LAST);
lr_think_time(7);
web_submit_data("login.pl",
"Action=http://localhost:1080/WebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:1080/WebTours/nav.pl?in=home",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=108552.169623329ffiDzfcpccfDDfAVpQVDDf", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=on", ENDITEM,
LAST);
web_submit_data("login.pl_2",
"Action=http://localhost:1080/WebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:1080/WebTours/nav.pl?in=home",
"Snapshot=t10.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=108552.169623329ffiDzfcpccfDDfAVpQVDDf", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=on", ENDITEM,
"Name=login.x", "Value=0", ENDITEM,
"Name=login.y", "Value=0", ENDITEM,
LAST);
web_image("Search Flights Button",
"Alt=Search Flights Button",
"Snapshot=t11.inf",
LAST);
lr_think_time(19);
web_url("FormDateUpdate.class",
"URL=http://localhost:1080/WebTours/FormDateUpdate.class",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTML",
LAST);
web_url("CalSelect.class",
"URL=http://localhost:1080/WebTours/CalSelect.class",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTML",
LAST);
web_url("Calendar.class",
"URL=http://localhost:1080/WebTours/Calendar.class",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTML",
LAST);
web_submit_data("reservations.pl",
"Action=http://localhost:1080/WebTours/reservations.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:1080/WebTours/reservations.pl?page=welcome",
"Snapshot=t12.inf",
"Mode=HTML",
ITEMDATA,
"Name=advanceDiscount", "Value=0", ENDITEM,
"Name=depart", "Value=Denver", ENDITEM,
"Name=departDate", "Value=06/20/2012", ENDITEM,
"Name=arrive", "Value=Los Angeles", ENDITEM,
"Name=returnDate", "Value=06/21/2012", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=seatPref", "Value=Aisle", 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=40", ENDITEM,
"Name=findFlights.y", "Value=4", ENDITEM,
LAST);
web_submit_form("reservations.pl_2",
"Snapshot=t13.inf",
ITEMDATA,
"Name=outboundFlight", "Value=030;251;06/20/2012", ENDITEM,
"Name=reserveFlights.x", "Value=22", ENDITEM,
"Name=reserveFlights.y", "Value=10", ENDITEM,
LAST);
lr_think_time(59);
web_submit_form("reservations.pl_3",
"Snapshot=t14.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=36", ENDITEM,
"Name=buyFlights.y", "Value=11", ENDITEM,
LAST);
lr_think_time(1927);
web_url("welcome.pl",
"URL=http://localhost:1080/WebTours/welcome.pl?page=itinerary",
"Resource=0",
"RecContentType=text/html",
"Referer=http://localhost:1080/WebTours/nav.pl?page=menu&in=flights",
"Snapshot=t15.inf",
"Mode=HTML",
LAST);
web_image("SignOff Button",
"Alt=SignOff Button",
"Snapshot=t16.inf",
LAST);
return 0; |
|