|
最近在学习LR ,就按照教程的案例web tours来进行。正常的录制了脚本,在最后一个步骤sign off button后面添加了web_image_check,但是总是报错,请版主救救小女子!
另有疑问:教程要求在Image check中
为什么让选用第二个选项SCR属性(ALT//SCR的差别在哪里呢)并输入fma-gateway.jpg (此处fam-gateway.jpg有什么意义,可否换成其他名称????)
录制的脚本信息如下:
Action()
{
web_url("newversion",
"URL=http://updatecn.maxthon.com/client/m2/newversion/?ver=2.0.5.7845&lan=0x0804&lc=86&pn=max2&mid=001bb97a0c7d",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
LAST);
lr_think_time(5);
web_submit_form("login.pl",
"Snapshot=t3.inf",
ITEMDATA,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=login.x", "Value=37", ENDITEM,
"Name=login.y", "Value=7", ENDITEM,
LAST);
lr_start_transaction("confirm_flight");
web_image("Search Flights Button",
"Alt=Search Flights Button",
"Snapshot=t4.inf",
LAST);
lr_think_time(8);
web_url("FormDateUpdate.class",
"URL=http://127.0.0.1:1080/WebTours/FormDateUpdate.class",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTML",
LAST);
web_url("CalSelect.class",
"URL=http://127.0.0.1:1080/WebTours/CalSelect.class",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTML",
LAST);
web_url("Calendar.class",
"URL=http://127.0.0.1:1080/WebTours/Calendar.class",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTML",
LAST);
web_submit_data("reservations.pl",
"Action=http://127.0.0.1:1080/WebTours/reservations.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/reservations.pl?page=welcome",
"Snapshot=t5.inf",
"Mode=HTML",
ITEMDATA,
"Name=advanceDiscount", "Value=0", ENDITEM,
"Name=depart", "Value=Denver", ENDITEM,
"Name=departDate", "Value=09/02/2010", ENDITEM,
"Name=arrive", "Value=Paris", ENDITEM,
"Name=returnDate", "Value=09/03/2010", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=seatPref", "Value={Seat}", 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=37", ENDITEM,
"Name=findFlights.y", "Value=9", ENDITEM,
LAST);
web_submit_form("reservations.pl_2",
"Snapshot=t6.inf",
ITEMDATA,
"Name=outboundFlight", "Value=040;350;09/02/2010", ENDITEM,
"Name=reserveFlights.x", "Value=31", ENDITEM,
"Name=reserveFlights.y", "Value=8", ENDITEM,
LAST);
lr_end_transaction("confirm_flight", LR_AUTO);
lr_think_time(9);
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=54", ENDITEM,
"Name=buyFlights.y", "Value=10", ENDITEM,
LAST);
web_url("welcome.pl",
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?page=itinerary",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=flights",
"Snapshot=t8.inf",
"Mode=HTML",
LAST);
web_image("SignOff Button",
"Alt=SignOff Button",
"Snapshot=t9.inf",
LAST);
web_image_check("web_image_check",
"Src=fma-gateway.jpg",
LAST);
return 0;
}
各位,能解决此问题的朋友99我吧!
--------------------------------------------------------------------------------
[ 本帖最后由 5ipeter 于 2010-9-1 15:59 编辑 ] |
|