URL模式录制的脚本不用做关联吗?
刚用URL模式录了个脚本,没做关联回放也成功了,这是为什么。这个过程用html模式录制的话是需要做关联的 代码贴上来 Action()
{
web_url("mercuryWebTours",
"URL=http://127.0.0.1:1080/mercuryWebTours/",
"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/mercuryWebTours/header.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/",
"Snapshot=t2.inf",
"Mode=HTTP",
LAST);
web_url("welcome.pl",
"URL=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?signOff=true",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/",
"Snapshot=t4.inf",
"Mode=HTTP",
LAST);
web_concurrent_end(NULL);
web_url("mercury_logo.gif",
"URL=http://127.0.0.1:1080/mercuryWebTours/images/mercury_logo.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/mercuryWebTours/header.html",
"Snapshot=t3.inf",
LAST);
web_concurrent_start(NULL);
web_url("home.html",
"URL=http://127.0.0.1:1080/MercuryWebTours/home.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?signOff=true",
"Snapshot=t5.inf",
"Mode=HTTP",
LAST);
web_url("nav.pl",
"URL=http://127.0.0.1:1080/mercuryWebTours/nav.pl?in=home",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?signOff=true",
"Snapshot=t7.inf",
"Mode=HTTP",
LAST);
web_concurrent_end(NULL);
web_url("fma-gateway.jpg",
"URL=http://127.0.0.1:1080/MercuryWebTours/images/fma-gateway.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://127.0.0.1:1080/MercuryWebTours/home.html",
"Snapshot=t6.inf",
LAST);
web_concurrent_start(NULL);
web_url("JSFormSubmit.js",
"URL=http://127.0.0.1:1080/MercuryWebTours/JSFormSubmit.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?in=home",
"Snapshot=t8.inf",
LAST);
web_url("mer_login.gif",
"URL=http://127.0.0.1:1080/MercuryWebTours/images/mer_login.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?in=home",
"Snapshot=t9.inf",
LAST);
web_concurrent_end(NULL);
lr_think_time(8);
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/mercuryWebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?in=home",
"Snapshot=t10.inf",
"Mode=HTTP",
ITEMDATA,
"Name=userSession", "Value=98459.4634264885fAztfAipzfDADiHpAfVQ", ENDITEM,
"Name=username", "Value=123", ENDITEM,
"Name=password", "Value=123456", ENDITEM,
"Name=JSFormSubmit", "Value=on", ENDITEM,
"Name=login.x", "Value=72", ENDITEM,
"Name=login.y", "Value=9", ENDITEM,
LAST);
web_concurrent_start(NULL);
web_url("nav.pl_2",
"URL=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=home",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/login.pl",
"Snapshot=t11.inf",
"Mode=HTTP",
LAST);
web_url("login.pl_2",
"URL=http://127.0.0.1:1080/mercuryWebTours/login.pl?intro=true",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/login.pl",
"Snapshot=t16.inf",
"Mode=HTTP",
LAST);
web_concurrent_end(NULL);
web_concurrent_start(NULL);
web_url("flights.gif",
"URL=http://127.0.0.1:1080/MercuryWebTours/images/flights.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=home",
"Snapshot=t12.inf",
LAST);
web_url("itinerary.gif",
"URL=http://127.0.0.1:1080/MercuryWebTours/images/itinerary.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=home",
"Snapshot=t13.inf",
LAST);
web_url("in_home.gif",
"URL=http://127.0.0.1:1080/MercuryWebTours/images/in_home.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=home",
"Snapshot=t14.inf",
LAST);
web_url("signoff.gif",
"URL=http://127.0.0.1:1080/MercuryWebTours/images/signoff.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=home",
"Snapshot=t15.inf",
LAST);
web_concurrent_end(NULL);
web_url("fma-performance-center.jpg",
"URL=http://127.0.0.1:1080/MercuryWebTours/images/fma-performance-center.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://127.0.0.1:1080/mercuryWebTours/login.pl?intro=true",
"Snapshot=t17.inf",
LAST);
web_url("Search Flights Button",
"URL=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?page=search",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=home",
"Snapshot=t18.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("nav.pl_3",
"URL=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=flights",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?page=search",
"Snapshot=t19.inf",
"Mode=HTTP",
LAST);
web_url("reservations.pl",
"URL=http://127.0.0.1:1080/mercuryWebTours/reservations.pl?page=welcome",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?page=search",
"Snapshot=t22.inf",
"Mode=HTTP",
LAST);
web_concurrent_end(NULL);
web_concurrent_start(NULL);
web_url("in_flights.gif",
"URL=http://127.0.0.1:1080/MercuryWebTours/images/in_flights.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=flights",
"Snapshot=t20.inf",
LAST);
web_url("itinerary.gif_2",
"URL=http://127.0.0.1:1080/MercuryWebTours/images/itinerary.gif",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=flights",
"Mode=HTTP",
LAST);
web_url("home.gif",
"URL=http://127.0.0.1:1080/MercuryWebTours/images/home.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=flights",
"Snapshot=t21.inf",
LAST);
web_url("signoff.gif_2",
"URL=http://127.0.0.1:1080/MercuryWebTours/images/signoff.gif",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=flights",
"Mode=HTTP",
LAST);
web_concurrent_end(NULL);
web_concurrent_start(NULL);
web_url("fma-products.jpg",
"URL=http://127.0.0.1:1080/mercuryWebTours/images/fma-products.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://127.0.0.1:1080/mercuryWebTours/reservations.pl?page=welcome",
"Snapshot=t23.inf",
LAST);
web_url("button_next.gif",
"URL=http://127.0.0.1:1080/MercuryWebTours/images/button_next.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/mercuryWebTours/reservations.pl?page=welcome",
"Snapshot=t24.inf",
LAST);
web_concurrent_end(NULL);
lr_think_time(6);
web_url("FormDateUpdate.class",
"URL=http://127.0.0.1:1080/mercuryWebTours/FormDateUpdate.class",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTTP",
LAST);
web_url("CalSelect.class",
"URL=http://127.0.0.1:1080/mercuryWebTours/CalSelect.class",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTTP",
LAST);
web_url("Calendar.class",
"URL=http://127.0.0.1:1080/mercuryWebTours/Calendar.class",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTTP",
LAST);
lr_think_time(14);
web_submit_data("reservations.pl_2",
"Action=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/reservations.pl?page=welcome",
"Snapshot=t25.inf",
"Mode=HTTP",
ITEMDATA,
"Name=advanceDiscount", "Value=0", ENDITEM,
"Name=depart", "Value=Frankfurt", ENDITEM,
"Name=departDate", "Value=07/09/2008", ENDITEM,
"Name=arrive", "Value=London", ENDITEM,
"Name=returnDate", "Value=07/10/2008", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=seatPref", "Value=None", 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=27", ENDITEM,
"Name=findFlights.y", "Value=12", ENDITEM,
LAST);
} web_submit_data("reservations.pl_3",
"Action=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
"Snapshot=t26.inf",
"Mode=HTTP",
ITEMDATA,
"Name=outboundFlight", "Value=120;266;07/09/2008", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=advanceDiscount", "Value=0", ENDITEM,
"Name=seatType", "Value=Coach", ENDITEM,
"Name=seatPref", "Value=None", ENDITEM,
"Name=reserveFlights.x", "Value=40", ENDITEM,
"Name=reserveFlights.y", "Value=9", ENDITEM,
LAST);
web_submit_data("reservations.pl_4",
"Action=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
"Snapshot=t27.inf",
"Mode=HTTP",
ITEMDATA,
"Name=firstName", "Value=1", ENDITEM,
"Name=lastName", "Value=23", ENDITEM,
"Name=address1", "Value=123", ENDITEM,
"Name=address2", "Value=123", ENDITEM,
"Name=pass1", "Value=1 23", 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=None", ENDITEM,
"Name=outboundFlight", "Value=120;266;07/09/2008", ENDITEM,
"Name=advanceDiscount", "Value=0", ENDITEM,
"Name=returnFlight", "Value=", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=.cgifields", "Value=saveCC", ENDITEM,
"Name=buyFlights.x", "Value=31", ENDITEM,
"Name=buyFlights.y", "Value=10", ENDITEM,
LAST);
web_url("bookanother.gif",
"URL=http://127.0.0.1:1080/MercuryWebTours/images/bookanother.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
"Snapshot=t28.inf",
LAST);
web_submit_data("reservations.pl_5",
"Action=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
"Snapshot=t29.inf",
"Mode=HTTP",
ITEMDATA,
"Name=Book Another.x", "Value=44", ENDITEM,
"Name=Book Another.y", "Value=9", ENDITEM,
LAST);
web_url("button_next.gif_2",
"URL=http://127.0.0.1:1080/MercuryWebTours/images/button_next.gif",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
"Mode=HTTP",
LAST);
web_url("welcome.pl_2",
"URL=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?signOff=1",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=flights",
"Snapshot=t30.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("home.html_2",
"URL=http://127.0.0.1:1080/MercuryWebTours/home.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?signOff=1",
"Snapshot=t31.inf",
"Mode=HTTP",
LAST);
web_url("nav.pl_4",
"URL=http://127.0.0.1:1080/mercuryWebTours/nav.pl?in=home",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?signOff=1",
"Snapshot=t32.inf",
"Mode=HTTP",
LAST);
web_concurrent_end(NULL);
web_url("fma-gateway.jpg_2",
"URL=http://127.0.0.1:1080/MercuryWebTours/images/fma-gateway.jpg",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/MercuryWebTours/home.html",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("JSFormSubmit.js_2",
"URL=http://127.0.0.1:1080/MercuryWebTours/JSFormSubmit.js",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?in=home",
"Mode=HTTP",
LAST);
web_url("mer_login.gif_2",
"URL=http://127.0.0.1:1080/MercuryWebTours/images/mer_login.gif",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?in=home",
"Mode=HTTP",
LAST);
web_concurrent_end(NULL);
return 0; 附件 Action.c(408): 注册 web_url("nav.pl_4") 成功
Action.c(417): web_concurrent_end 已成功,1490 个正文字节,253 介标头字节
Action.c(419): 资源“http://127.0.0.1:1080/MercuryWebTours/images/fma-gateway.jpg”已在缓存中,不会再次下载
Action.c(427): web_concurrent_start 成功
Action.c(429): 资源“http://127.0.0.1:1080/MercuryWebTours/JSFormSubmit.js”已在缓存中,不会再次下载
Action.c(437): 资源“http://127.0.0.1:1080/MercuryWebTours/images/mer_login.gif”已在缓存中,不会再次下载
Action.c(445): web_concurrent_end 成功
正在结束操作 Action。
正在结束迭代 1。
正在结束 Vuser...
正在开始操作 vuser_end。
正在结束操作 vuser_end。
Vuser 已终止。
[ 本帖最后由 test7 于 2008-7-8 11:40 编辑 ] 没有特殊情况不要用url_basescript录制脚本看的头疼,然后关不关联和录制无关 但是没关联回放成功了,怎么回事,用html时是要关联的 咋回事儿啊,有人知道吗 你录制的什么操作阿? 就是LR自带的那个订票系统的订票 这个不需要做关联吧 需要 如果只是进行订票的话,不需要关联。
页:
[1]