LR录制自带例子(MercuryTours),回放时报错,麻烦各位高手看看,谢谢
我做了一个最简单的录制,就是登录后订票,然后退出录制脚本如下:
#include "web_api.h"
Action()
{
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=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=96711.5033616849tQHtfQHpQftVzzzHcQitHpfiHHcf", ENDITEM,
"Name=username", "Value=lijiang", ENDITEM,
"Name=password", "Value=lijiang", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=56", ENDITEM,
"Name=login.y", "Value=5", ENDITEM,
LAST);
lr_think_time(9);
web_image("Search Flights Button",
"Alt=Search Flights Button",
"Snapshot=t3.inf",
LAST);
lr_think_time(7);
web_submit_form("reservations.pl",
"Snapshot=t4.inf",
ITEMDATA,
"Name=depart", "Value=London", ENDITEM,
"Name=departDate", "Value=11/02/2007", ENDITEM,
"Name=arrive", "Value=Los Angeles", ENDITEM,
"Name=returnDate", "Value=11/03/2007", ENDITEM,
"Name=numPassengers", "Value=2", ENDITEM,
"Name=roundtrip", "Value=<OFF>", ENDITEM,
"Name=seatPref", "Value=None", ENDITEM,
"Name=seatType", "Value=Coach", ENDITEM,
"Name=findFlights.x", "Value=62", ENDITEM,
"Name=findFlights.y", "Value=10", ENDITEM,
LAST);
web_submit_form("reservations.pl_2",
"Snapshot=t5.inf",
ITEMDATA,
"Name=outboundFlight", "Value=230;773;11/02/2007", ENDITEM,
"Name=reserveFlights.x", "Value=65", ENDITEM,
"Name=reserveFlights.y", "Value=15", ENDITEM,
LAST);
lr_think_time(6);
web_submit_form("reservations.pl_3",
"Snapshot=t6.inf",
ITEMDATA,
"Name=firstName", "Value=ddasfsa", ENDITEM,
"Name=lastName", "Value=sadf", ENDITEM,
"Name=address1", "Value=sadf", ENDITEM,
"Name=address2", "Value=asdf", ENDITEM,
"Name=pass1", "Value= dsfa", ENDITEM,
"Name=pass2", "Value=sdf", ENDITEM,
"Name=creditCard", "Value=235326523643", ENDITEM,
"Name=expDate", "Value=", ENDITEM,
"Name=saveCC", "Value=<OFF>", ENDITEM,
"Name=buyFlights.x", "Value=83", ENDITEM,
"Name=buyFlights.y", "Value=10", ENDITEM,
LAST);
lr_think_time(1);
web_image("Itinerary Button",
"Alt=Itinerary Button",
"Ordinal=1",
"Snapshot=t7.inf",
LAST);
lr_think_time(2);
web_image("SignOff Button",
"Alt=SignOff Button",
"Ordinal=1",
"Snapshot=t8.inf",
LAST);
return 0;
}
回放时,报如下错误:
Action.c(22): Error -27987: Requested image not found
Action.c(22): web_image("Search Flights Button") highest severity level was "ERROR", 0 body bytes, 0 header bytes
Action.c(29): Error -27979: Requested form not found
Action.c(29): web_submit_form("reservations.pl") highest severity level was "ERROR", 0 body bytes, 0 header bytes
为什么不能回放呢,谢谢各位高手 各位高手帮我看看吧! 自带订票的哪个用户名和密码是什么了?
lijiang也进不去啊? 可能是你录制过程有问题, 建议你重新录制.:o 就是 图片 没找到
web_image("Search Flights Button",
"Alt=Search Flights Button",
"Snapshot=t3.inf",
LAST);
名字,alt属性 ,都对吗?
实在不行 还是建议重新 录制 比较好 我已经录制很多次了,但是就是回放时要报错,我也没有修改任何脚本,录制完一遍后就回放的。 自带订票的哪个用户名和密码是什么了?
是jojo,bean,
我自己注册了个用户名和密码登录的 应该不是用户名和密码的问题, 我自己试着录了一遍, 回放没问题. 但录出来的脚本和你的脚本开始处有点儿不一样.是不是某处设置有问题? 是啊,以前还记得是什么
现在不知道用户名与密码拉!~! 都是高手啊:L
重新录制
最好把过程分开,Init,Action,End 看你上面的脚本没什么不同,只能重新来过吧! 是呀。有的时候重新录制就好用了。而且你的录制过程很简单,就是登陆退出,应该不会出现什么问题的。要不就检查一下自己的浏览器有没有问题。是不是自己的电脑的问题呢。回复 7# 的帖子
thankyou for your username and passwored!!
页:
[1]