|
3#
楼主 |
发表于 2007-5-18 14:34:20
|
只看该作者
#include "web_api.h"
Action()
{
// [WCSPARAM WCSParam_Diff1 42 95541.2503847712tQVttADpAzzzzzzHcQtizptVit] Parameter {WCSParam_Diff1} created by Correlation Studio
web_reg_save_param( "WCSParam_Diff1", "LB=userSession value=", "RB=>", "Ord=1", "Search=Body", "RelFrameId=1.2.1", LAST );
web_url("MercuryWebTours",
"URL=http://localhost:7080/MercuryWebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time( 2 );
web_submit_data("login.pl",
"Action=http://localhost:7080/MercuryWebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:7080/MercuryWebTours/nav.pl?in=home",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value={WCSParam_Diff1}", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=on", ENDITEM,
"Name=login.x", "Value=44", ENDITEM,
"Name=login.y", "Value=16", ENDITEM,
LAST);
web_image("Search Flights Button",
"Alt=Search Flights Button",
"Snapshot=t3.inf",
LAST);
lr_think_time( 10 );
web_submit_form("reservations.pl",
"Snapshot=t4.inf",
ITEMDATA,
"Name=depart", "Value={depart}", ENDITEM,
"Name=departDate", "Value=05/19/2007", ENDITEM,
"Name=arrive", "Value={arrive}", ENDITEM,
"Name=returnDate", "Value=05/20/2007", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=roundtrip", "Value=<OFF>", ENDITEM,
"Name=seatPref", "Value=Window", ENDITEM,
"Name=seatType", "Value=First", ENDITEM,
"Name=findFlights.x", "Value=51", ENDITEM,
"Name=findFlights.y", "Value=12", ENDITEM,
LAST);
lr_think_time( 3 );
web_submit_form("reservations.pl_2",
"Snapshot=t5.inf",
ITEMDATA,
"Name=outboundFlight", "Value=121;444;05/19/2007", ENDITEM,
"Name=reserveFlights.x", "Value=60", ENDITEM,
"Name=reserveFlights.y", "Value=13", ENDITEM,
LAST);
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=0909", ENDITEM,
"Name=saveCC", "Value=on", ENDITEM,
"Name=buyFlights.x", "Value=69", ENDITEM,
"Name=buyFlights.y", "Value=15", ENDITEM,
LAST);
web_image("SignOff Button",
"Alt=SignOff Button",
"Ordinal=1",
"Snapshot=t7.inf",
LAST);
return 0;
} |
|