有哪位大侠知道请告诉我,谢谢!!
我刚刚谢谢loadrunner,今天刚刚录制了一个脚本Action()
{
web_url("MercuryWebTours",
"URL=http://localhost:1080/MercuryWebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_add_cookie("MXRND=彛\x967绖&鬈巅_xPLk; DOMAIN=updatecn.maxthon.com");
web_add_cookie("MXUPDID=CdIcPEiRyxES6Q7fCvB7Ag==; DOMAIN=updatecn.maxthon.com");
web_url("latest",
"URL=http://updatecn.maxthon.com/client/latest/?ver=1.6.3.80&lan=0001&lc=86&mid=001c23f805fc",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
LAST);
lr_think_time(16);
web_submit_data("login.pl",
"Action=http://localhost:1080/MercuryWebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:1080/MercuryWebTours/nav.pl?in=home",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=98629.1803159174fAHDcDiptzcfDAtDQptDAHHf", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=72", ENDITEM,
"Name=login.y", "Value=9", ENDITEM,
LAST);
lr_think_time(4);
web_image("Search Flights Button",
"Alt=Search Flights Button",
"Snapshot=t4.inf",
LAST);
lr_think_time(19);
web_submit_form("reservations.pl",
"Snapshot=t5.inf",
ITEMDATA,
"Name=depart", "Value=Denver", ENDITEM,
"Name=departDate", "Value=08/02/2008", ENDITEM,
"Name=arrive", "Value=Los Angeles", ENDITEM,
"Name=returnDate", "Value=08/03/2008", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=roundtrip", "Value=<OFF>", ENDITEM,
"Name=seatPref", "Value=None", ENDITEM,
"Name=seatType", "Value=First", ENDITEM,
"Name=findFlights.x", "Value=50", ENDITEM,
"Name=findFlights.y", "Value=12", ENDITEM,
LAST);
lr_think_time(5);
web_submit_form("reservations.pl_2",
"Snapshot=t6.inf",
ITEMDATA,
"Name=outboundFlight", "Value=030;472;08/02/2008", ENDITEM,
"Name=reserveFlights.x", "Value=36", ENDITEM,
"Name=reserveFlights.y", "Value=14", ENDITEM,
LAST);
lr_think_time(13);
web_submit_form("reservations.pl_3",
"Snapshot=t7.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/06", ENDITEM,
"Name=saveCC", "Value=<OFF>", ENDITEM,
"Name=buyFlights.x", "Value=43", ENDITEM,
"Name=buyFlights.y", "Value=13", ENDITEM,
LAST);
web_image("SignOff Button",
"Alt=SignOff Button",
"Ordinal=1",
"Snapshot=t8.inf",
LAST);
return 0;
}
但是老是在
web_image("Search Flights Button",
"Alt=Search Flights Button",
"Snapshot=t4.inf",
LAST);
中老是过不去,有哪位大侠知道,请告诉我,谢谢!!
(这录制的是loadrunner中的订票系统) 建议LZ用这个函数web_image_check(); 如上楼所说的
页:
[1]