LR11自带的订票系统,脚本运行正确,但功能不能实现,在线等
我是XP系统,用的LR11,录制订票系统订票功能,然后在手动在页面中删除订票记录,运行脚本,手动查看订票记录时,发现没有记录,我用的是URL协议,重新又录制了一遍,还是不行(运行脚本,在页面中查不出记录)ACTION脚本:
web_concurrent_end(NULL);
web_url("in_itinerary.gif",
"URL=http://127.0.0.1:1080/WebTours/images/in_itinerary.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=itinerary",
"Snapshot=t29.inf",
LAST);
web_concurrent_start(NULL);
web_url("cancelallreservations.gif",
"URL=http://127.0.0.1:1080/WebTours/images/cancelallreservations.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/WebTours/itinerary.pl",
"Snapshot=t30.inf",
LAST);
web_url("cancelreservation.gif",
"URL=http://127.0.0.1:1080/WebTours/images/cancelreservation.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/WebTours/itinerary.pl",
"Snapshot=t31.inf",
LAST);
web_concurrent_end(NULL);
web_url("SignOff Button",
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=1",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=itinerary",
"Snapshot=t32.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("home.html_2",
"URL=http://127.0.0.1:1080/WebTours/home.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=1",
"Snapshot=t33.inf",
"Mode=HTTP",
LAST);
web_url("nav.pl_5",
"URL=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=1",
"Snapshot=t34.inf",
"Mode=HTTP",
LAST);
web_concurrent_end(NULL);
return 0;
} 代码发错了,
Action()
{
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("header.html",
"URL=http://127.0.0.1:1080/WebTours/header.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/",
"Snapshot=t2.inf",
"Mode=HTTP",
LAST);
web_url("welcome.pl",
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/",
"Snapshot=t4.inf",
"Mode=HTTP",
LAST);
web_concurrent_end(NULL);
web_concurrent_start(NULL);
web_url("hp_logo.png",
"URL=http://127.0.0.1:1080/WebTours/images/hp_logo.png",
"Resource=1",
"RecContentType=image/png",
"Referer=http://127.0.0.1:1080/WebTours/header.html",
"Snapshot=t3.inf",
LAST);
web_url("webtours.png",
"URL=http://127.0.0.1:1080/WebTours/images/webtours.png",
"Resource=1",
"RecContentType=image/png",
"Referer=http://127.0.0.1:1080/WebTours/header.html",
"Snapshot=t5.inf",
LAST);
web_concurrent_end(NULL);
web_concurrent_start(NULL);
web_url("home.html",
"URL=http://127.0.0.1:1080/WebTours/home.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true",
"Snapshot=t6.inf",
"Mode=HTTP",
LAST);
web_url("nav.pl",
"URL=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true",
"Snapshot=t7.inf",
"Mode=HTTP",
LAST);
web_concurrent_end(NULL);
web_url("mer_login.gif",
"URL=http://127.0.0.1:1080/WebTours/images/mer_login.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t8.inf",
LAST);
lr_think_time(5); web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t9.inf",
"Mode=HTTP",
ITEMDATA,
"Name=userSession", "Value=106103.308869988ftfHziipQfDcHtzpVDDH", ENDITEM,
"Name=username", "Value=zhang", ENDITEM,
"Name=password", "Value=123", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=65", ENDITEM,
"Name=login.y", "Value=13", ENDITEM,
LAST);
web_concurrent_start(NULL);
web_url("login.pl_2",
"URL=http://127.0.0.1:1080/WebTours/login.pl?intro=true",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/login.pl",
"Snapshot=t10.inf",
"Mode=HTTP",
LAST);
web_url("nav.pl_2",
"URL=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/login.pl",
"Snapshot=t11.inf",
"Mode=HTTP",
LAST);
web_concurrent_end(NULL);
web_concurrent_start(NULL);
web_url("flights.gif",
"URL=http://127.0.0.1:1080/WebTours/images/flights.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",
"Snapshot=t12.inf",
LAST);
web_url("in_home.gif",
"URL=http://127.0.0.1:1080/WebTours/images/in_home.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",
"Snapshot=t13.inf",
LAST);
web_url("itinerary.gif",
"URL=http://127.0.0.1:1080/WebTours/images/itinerary.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",
"Snapshot=t14.inf",
LAST);
web_url("signoff.gif",
"URL=http://127.0.0.1:1080/WebTours/images/signoff.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",
"Snapshot=t15.inf",
LAST);
web_concurrent_end(NULL);
web_url("Search Flights Button",
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?page=search",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",
"Snapshot=t16.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("nav.pl_3",
"URL=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=flights",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/welcome.pl?page=search",
"Snapshot=t17.inf",
"Mode=HTTP",
LAST);
web_url("reservations.pl",
"URL=http://127.0.0.1:1080/WebTours/reservations.pl?page=welcome",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/welcome.pl?page=search",
"Snapshot=t18.inf",
"Mode=HTTP",
LAST);
web_concurrent_end(NULL);
web_concurrent_start(NULL);
web_url("in_flights.gif",
"URL=http://127.0.0.1:1080/WebTours/images/in_flights.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=flights",
"Snapshot=t19.inf",
LAST);
web_url("home.gif",
"URL=http://127.0.0.1:1080/WebTours/images/home.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=flights",
"Snapshot=t20.inf",
LAST);
web_concurrent_end(NULL);
web_url("button_next.gif",
"URL=http://127.0.0.1:1080/WebTours/images/button_next.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/WebTours/reservations.pl?page=welcome",
"Snapshot=t21.inf",
LAST); web_url("FormDateUpdate.class",
"URL=http://127.0.0.1:1080/WebTours/FormDateUpdate.class",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTTP",
LAST);
web_url("CalSelect.class",
"URL=http://127.0.0.1:1080/WebTours/CalSelect.class",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTTP",
LAST);
web_url("Calendar.class",
"URL=http://127.0.0.1:1080/WebTours/Calendar.class",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTTP",
LAST);
web_submit_data("reservations.pl_2",
"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=t22.inf",
"Mode=HTTP",
ITEMDATA,
"Name=advanceDiscount", "Value=0", ENDITEM,
"Name=depart", "Value=Frankfurt", ENDITEM,
"Name=departDate", "Value=07/06/2011", ENDITEM,
"Name=arrive", "Value=Paris", ENDITEM,
"Name=returnDate", "Value=07/07/2011", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=seatPref", "Value=Aisle", 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=47", ENDITEM,
"Name=findFlights.y", "Value=8", ENDITEM,
LAST);
web_submit_data("reservations.pl_3",
"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",
"Snapshot=t23.inf",
"Mode=HTTP",
ITEMDATA,
"Name=outboundFlight", "Value=140;128;07/06/2011", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=advanceDiscount", "Value=0", ENDITEM,
"Name=seatType", "Value=Coach", ENDITEM,
"Name=seatPref", "Value=Aisle", ENDITEM,
"Name=reserveFlights.x", "Value=57", ENDITEM,
"Name=reserveFlights.y", "Value=3", ENDITEM,
LAST);
lr_think_time(5);
web_submit_data("reservations.pl_4",
"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",
"Snapshot=t24.inf",
"Mode=HTTP",
ITEMDATA,
"Name=firstName", "Value=sas", ENDITEM,
"Name=lastName", "Value=fff", ENDITEM,
"Name=address1", "Value=", ENDITEM,
"Name=address2", "Value=", ENDITEM,
"Name=pass1", "Value= ", ENDITEM,
"Name=creditCard", "Value=", ENDITEM,
"Name=expDate", "Value=", ENDITEM,
"Name=oldCCOption", "Value=", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=seatType", "Value=Coach", ENDITEM,
"Name=seatPref", "Value=Aisle", ENDITEM,
"Name=outboundFlight", "Value=140;128;07/06/2011", ENDITEM,
"Name=advanceDiscount", "Value=0", ENDITEM,
"Name=returnFlight", "Value=", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=.cgifields", "Value=saveCC", ENDITEM,
"Name=buyFlights.x", "Value=86", ENDITEM,
"Name=buyFlights.y", "Value=14", ENDITEM,
LAST);
web_url("bookanother.gif",
"URL=http://127.0.0.1:1080/WebTours/images/bookanother.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/WebTours/reservations.pl",
"Snapshot=t25.inf",
LAST);
web_url("welcome.pl_2",
"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=t26.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("itinerary.pl",
"URL=http://127.0.0.1:1080/WebTours/itinerary.pl",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/welcome.pl?page=itinerary",
"Snapshot=t27.inf",
"Mode=HTTP",
LAST);
web_url("nav.pl_4",
"URL=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=itinerary",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/welcome.pl?page=itinerary",
"Snapshot=t28.inf",
"Mode=HTTP",
LAST);
web_concurrent_end(NULL);
web_url("in_itinerary.gif",
"URL=http://127.0.0.1:1080/WebTours/images/in_itinerary.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=itinerary",
"Snapshot=t29.inf",
LAST);
web_concurrent_start(NULL);
web_url("cancelallreservations.gif",
"URL=http://127.0.0.1:1080/WebTours/images/cancelallreservations.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/WebTours/itinerary.pl",
"Snapshot=t30.inf",
LAST);
web_url("cancelreservation.gif",
"URL=http://127.0.0.1:1080/WebTours/images/cancelreservation.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/WebTours/itinerary.pl",
"Snapshot=t31.inf",
LAST);
web_concurrent_end(NULL);
web_url("SignOff Button",
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=1",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=itinerary",
"Snapshot=t32.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("home.html_2",
"URL=http://127.0.0.1:1080/WebTours/home.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=1",
"Snapshot=t33.inf",
"Mode=HTTP",
LAST);
web_url("nav.pl_5",
"URL=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=1",
"Snapshot=t34.inf",
"Mode=HTTP",
LAST);
web_concurrent_end(NULL);
return 0;
} 我还真没整过LR自带的东西……
我在想,是否是你的userSession需要关联 需要关联 回复 5# wsbuaa
:)恩 你是对的,问题解决 我刚接触LR,不熟悉,具体是怎么解决的,楼主能否详细说一下,谢谢啦 楼主能否说一下详细解决方法,谢谢
页:
[1]