|
5#
楼主 |
发表于 2007-7-30 16:30:17
|
只看该作者
这是我录制的教本,出错的是Action.c(41)
#include "web_api.h"
Action()
{
web_submit_data("login.php",
"Action=http://newtours.mercuryinteractive.com/tour/login.php",
"Method=POST",
"RecContentType=text/html",
"Referer=http://newtours.mercuryinteractive.com/tour/",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=action", "Value=process", ENDITEM,
"Name=userName", "Value=retaxl", ENDITEM,
"Name=password", "Value=820527", ENDITEM,
"Name=login.x", "Value=0", ENDITEM,
"Name=login.y", "Value=0", ENDITEM,
EXTRARES,
"URL=../classes/calendar/showCalendar.class", ENDITEM,
"URL=../classes/calendar/CalSelect.class", ENDITEM,
"URL=../classes/calendar/showCalendar$SymAction.class", ENDITEM,
LAST);
lr_think_time(7);
web_submit_form("mercuryreservation2.php",
"Snapshot=t3.inf",
ITEMDATA,
"Name=tripType", "Value=roundtrip", ENDITEM,
"Name=passCount", "Value=1", ENDITEM,
"Name=fromPort", "Value=London", ENDITEM,
"Name=fromMonth", "Value=July", ENDITEM,
"Name=fromDay", "Value=5", ENDITEM,
"Name=toPort", "Value=New York", ENDITEM,
"Name=toMonth", "Value=July", ENDITEM,
"Name=toDay", "Value=10", ENDITEM,
"Name=servClass", "Value=Business", ENDITEM,
"Name=airline", "Value=No Preference", ENDITEM,
"Name=findFlights.x", "Value=45", ENDITEM,
"Name=findFlights.y", "Value=16", ENDITEM,
LAST);
web_submit_form("mercurypurchase.php",
"Snapshot=t4.inf",
ITEMDATA,
"Name=outFlight", "Value=Blue Skies Airlines$360$270$5:03", ENDITEM,
"Name=inFlight", "Value=Blue Skies Airlines$630$270$12:23", ENDITEM,
"Name=reserveFlights.x", "Value=63", ENDITEM,
"Name=reserveFlights.y", "Value=9", ENDITEM,
LAST);
lr_think_time(8);
web_submit_form("mercurypurchase2.php",
"Snapshot=t5.inf",
ITEMDATA,
"Name=passFirst0", "Value=l", ENDITEM,
"Name=passLast0", "Value=x", ENDITEM,
"Name=pass.0.meal", "Value=No preference", ENDITEM,
"Name=creditCard", "Value=American Express", ENDITEM,
"Name=creditnumber", "Value=123456", ENDITEM,
"Name=cc_exp_dt_mn", "Value=None", ENDITEM,
"Name=cc_exp_dt_yr", "Value=None", ENDITEM,
"Name=cc_frst_name", "Value=", ENDITEM,
"Name=cc_mid_name", "Value=", ENDITEM,
"Name=cc_last_name", "Value=", ENDITEM,
"Name=ticketLess", "Value=checkbox", ENDITEM,
"Name=billAddress1", "Value=1325 Borregas Ave.", ENDITEM,
"Name=billAddress2", "Value=", ENDITEM,
"Name=billCity", "Value=Sunnyvale", ENDITEM,
"Name=billState", "Value=CA", ENDITEM,
"Name=billZip", "Value=94089", ENDITEM,
"Name=billCountry", "Value=UNITED STATES", ENDITEM,
"Name=delAddress1", "Value=1325 Borregas Ave.", ENDITEM,
"Name=delAddress2", "Value=", ENDITEM,
"Name=delCity", "Value=Sunnyvale", ENDITEM,
"Name=delState", "Value=CA", ENDITEM,
"Name=delZip", "Value=94089", ENDITEM,
"Name=delCountry", "Value=UNITED STATES", ENDITEM,
"Name=buyFlights.x", "Value=64", ENDITEM,
"Name=buyFlights.y", "Value=15", ENDITEM,
LAST);
return 0;
} |
|