51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2982|回复: 8
打印 上一主题 下一主题

[求助] LR11自带的订票系统,脚本运行正确,但功能不能实现,在线等

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2011-7-5 15:37:17 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我是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;
}
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2011-7-5 15:42:49 | 只看该作者
代码发错了,
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);
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2011-7-5 15:43:21 | 只看该作者
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);
回复 支持 反对

使用道具 举报

该用户从未签到

4#
 楼主| 发表于 2011-7-5 15:45:36 | 只看该作者
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;
}
回复 支持 反对

使用道具 举报

该用户从未签到

5#
发表于 2011-7-5 16:01:27 | 只看该作者
我还真没整过LR自带的东西……
我在想,是否是你的userSession需要关联
回复 支持 反对

使用道具 举报

该用户从未签到

6#
发表于 2011-7-5 17:44:57 | 只看该作者
需要关联
回复 支持 反对

使用道具 举报

该用户从未签到

7#
 楼主| 发表于 2011-7-5 17:45:46 | 只看该作者
回复 5# wsbuaa


      恩 你是对的,问题解决
回复 支持 反对

使用道具 举报

该用户从未签到

8#
发表于 2012-9-20 22:54:44 | 只看该作者
我刚接触LR,不熟悉,具体是怎么解决的,楼主能否详细说一下,谢谢啦
回复 支持 反对

使用道具 举报

该用户从未签到

9#
发表于 2012-9-20 22:57:22 | 只看该作者
楼主能否说一下详细解决方法,谢谢
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-8 15:01 , Processed in 0.079930 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表