象这种删除操作怎么进行手动关联?
象这种删除操作怎么进行手动关联呢?看了一些资料没有看明白action部分操作的是删除预定的机票,录制的脚本如下
Action()
{
lr_think_time(19);
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=t9.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value={WCSParam_Diff1}", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=40", ENDITEM,
"Name=login.y", "Value=8", ENDITEM,
LAST);
web_image("Itinerary Button",
"Alt=Itinerary Button",
"Snapshot=t10.inf",
LAST);
lr_think_time(4);
web_submit_form("itinerary.pl",
"Snapshot=t11.inf",
ITEMDATA,
"Name=1", "Value=<OFF>", ENDITEM,
"Name=2", "Value=<OFF>", ENDITEM,
"Name=3", "Value=<OFF>", ENDITEM,
"Name=4", "Value=<OFF>", ENDITEM,
"Name=5", "Value=<OFF>", ENDITEM,
"Name=6", "Value=<OFF>", ENDITEM,
"Name=7", "Value=<OFF>", ENDITEM,
"Name=8", "Value=<OFF>", ENDITEM,
"Name=9", "Value=<OFF>", ENDITEM,
"Name=10", "Value=<OFF>", ENDITEM,
"Name=11", "Value=<OFF>", ENDITEM,
"Name=removeAllFlights.x", "Value=26", ENDITEM,
"Name=removeAllFlights.y", "Value=11", ENDITEM,
LAST);
return 0;
}
回放日志如下:
Action.c(24): Error -27979: Requested form not found
Action.c(24): web_submit_form("itinerary.pl") highest severity level was "ERROR", 0 body bytes, 0 header bytes 拜托各位大侠,知道的请多多指教,盼着答案呢! 关联函数呢。 好像这是最最经典的关联的例子吧,呵呵
lr_web_save_param() "Name=removeAllFlights.x", "Value=26", ENDITEM,
"Name=removeAllFlights.y", "Value=11", ENDITEM,
对value这两个值做关联 恩谢谢各位
这可能是最基本的,自己都是在工作之余自己学习loadrunner,没有可以讨论的人,这个问题自己琢磨了好久都没有答案,所以请教一下大家! 呵呵,你怎么一会xiaoqingting一会小蜻蜓的呢~ xiaoqingting是很久以前的帐号了 本来忘了密码了,那天没事试密码,终于又进来了:loveliness: web_submit_form("itinerary.pl",
"Snapshot=t11.inf",
ITEMDATA,
"Name=1", "Value=<OFF>", ENDITEM, //是你页面上所显示的已经预订了的机票
"Name=2", "Value=<OFF>", ENDITEM,
"Name=3", "Value=<OFF>", ENDITEM,
"Name=4", "Value=<OFF>", ENDITEM,
"Name=5", "Value=<OFF>", ENDITEM,
"Name=6", "Value=<OFF>", ENDITEM,
"Name=7", "Value=<OFF>", ENDITEM,
"Name=8", "Value=<OFF>", ENDITEM,
"Name=9", "Value=<OFF>", ENDITEM,
"Name=10", "Value=<OFF>", ENDITEM,
"Name=11", "Value=<OFF>", ENDITEM,
"Name=removeAllFlights.x", "Value=26", ENDITEM, //是你点击删除时所选择对象的x/y轴的值,
"Name=removeAllFlights.y", "Value=11", ENDITEM,
LAST);
从我知道的知识点出发,好像你选择删除时,删除的是所有已经订了机票,此时像“"Name=11", "Value=<OFF>", ENDITEM”这些内容你需要直接注销掉,否则如果已经订好的机票包含上述信息的话不出错,一旦不包含上述信息的肯定出错。因此你关联时需要关联,取消所有机票按钮的x/y轴的值。
回复 9# 的帖子
对, 你判断的没有错,我确实是把所有的订票删除了,这样关联也没有用吗?必须要把像“"Name=11", "Value=<OFF>", ENDITEM”这些内容直接注销掉吗?这是为什么呢,我不明白.
页:
[1]