|
2#
楼主 |
发表于 2008-10-9 11:04:17
|
只看该作者
就是LoadRunner航班查询,我只录制航班登录,为什么找不到图片,代码在下面,朋友帮我看看
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(7);
web_submit_form("login.pl",
"Snapshot=t2.inf",
ITEMDATA,
"Name=username", "Value={username}", ENDITEM,
"Name=password", "Value={password}", ENDITEM,
"Name=login.x", "Value=63", ENDITEM,
"Name=login.y", "Value=9", ENDITEM,
LAST);
lr_think_time(5);
web_image("Search Flights Button",
"Alt=Search Flights Button",
"Snapshot=t3.inf",
EXTRARES,
"Url=FormDateUpdate.class", "Referer=", ENDITEM,
"Url=CalSelect.class", "Referer=", ENDITEM,
LAST);
lr_think_time(11);
web_submit_form("reservations.pl",
"Snapshot=t4.inf",
ITEMDATA,
"Name=depart", "Value=London", ENDITEM,
"Name=departDate", "Value=10/09/2008", ENDITEM,
"Name=arrive", "Value=Los Angeles", ENDITEM,
"Name=returnDate", "Value=10/10/2008", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=roundtrip", "Value=<OFF>", ENDITEM,
"Name=seatPref", "Value=Aisle", ENDITEM,
"Name=seatType", "Value=Coach", ENDITEM,
"Name=findFlights.x", "Value=49", ENDITEM,
"Name=findFlights.y", "Value=8", ENDITEM,
LAST);
web_submit_form("reservations.pl_2",
"Snapshot=t5.inf",
ITEMDATA,
"Name=outboundFlight", "Value=230;773;10/09/2008", ENDITEM,
"Name=reserveFlights.x", "Value=53", ENDITEM,
"Name=reserveFlights.y", "Value=11", ENDITEM,
LAST);
lr_think_time(23);
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=123456", ENDITEM,
"Name=expDate", "Value=09/10", ENDITEM,
"Name=saveCC", "Value=<OFF>", ENDITEM,
"Name=buyFlights.x", "Value=62", ENDITEM,
"Name=buyFlights.y", "Value=12", ENDITEM,
LAST);
lr_think_time(6);
web_image("SignOff Button",
"Alt=SignOff Button",
"Snapshot=t7.inf",
LAST);
return 0;
} |
|