LoadRunner11 自带订票系统删除订票问题
我录制的是删除订票的脚本,之后做了session 和 Flight ID的关联,但是回放还是没能成功删除订票。 之前作过同样的脚本是可以成功回放的。哪位高手指点一下。
Action()
{
web_reg_save_param("sessionid",
"LB=<input type=hidden name=userSession value=",
"RB=>",
LAST);
web_reg_find("Text=Web Tours",
"Search=Body",
LAST);
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"TargetFrame=body",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value={sessionid}", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=41", ENDITEM,
"Name=login.y", "Value=11", ENDITEM,
LAST);
web_reg_find("Text=Transaction Summary",
"Search=Body",
LAST);
web_url("Itinerary Button",
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?page=itinerary",
"TargetFrame=body",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",
"Snapshot=t3.inf",
"Mode=HTML",
LAST);
web_reg_find("Text=flights.",
"Search=Body",
LAST);
web_reg_save_param("flightid",
"LB=<input type=\"hidden\" name=\"flightID\" value=\"",
"RB=\"/>",
"Ord=all",
LAST);
web_submit_data("itinerary.pl",
"Action=http://127.0.0.1:1080/WebTours/itinerary.pl",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/itinerary.pl",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=1", "Value=on", ENDITEM,
"Name=flightID", "Value=flightid_1", ENDITEM,
"Name=flightID", "Value=flightid_2", ENDITEM,
"Name=flightID", "Value=flightid_3", ENDITEM,
"Name=flightID", "Value=flightid_4", ENDITEM,
"Name=.cgifields", "Value=4", ENDITEM,
"Name=.cgifields", "Value=1", ENDITEM,
"Name=.cgifields", "Value=3", ENDITEM,
"Name=.cgifields", "Value=2", ENDITEM,
"Name=removeFlights.x", "Value=35", ENDITEM,
"Name=removeFlights.y", "Value=10", ENDITEM,
LAST);
web_url("SignOff Button",
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=1",
"TargetFrame=body",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=itinerary",
"Snapshot=t5.inf",
"Mode=HTML",
LAST);
return 0;
} 打开display 窗口看看具体情况 Run-time viewer中错误的提示:
"Unfortunately, we could not delete your entire itinerary because of a database synchronization error. If you could please re-load your itinerary and try again, we would appreciate it. Thank you for your patience." 急等高手指教 解决了,是位置放的不对 :victory: 回复 5# Brenda88
哪里的位置呢?
我找不到呢!!
票数是不固定的呀! web_reg_save_param("flightid",
这个位置要往前提一下,放在进入Itinerary 页面之前
页:
[1]