|
如图附件所示,我用removeFlights.x=104&removeFlights.y=9 作为鼠标定位,点击cancel checked reservation 按钮执行删除一条订单操作;代码如下:
include "web_api.h"
Action()
{
char creq[2048];
web_url("MercuryWebTours",
"URL=http://192.168.8.9/MercuryWebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time( 15 );
web_submit_form("login.pl",
"Snapshot=t2.inf",
ITEMDATA,
"Name=username", "Value=lihuichang", ENDITEM,
"Name=password", "Value=666666", ENDITEM,
"Name=login.x", "Value=47", ENDITEM,
"Name=login.y", "Value=9", ENDITEM,
EXTRARES,
"Url=images/flights.gif", "Referer=http://192.168.8.9/MercuryWebTours/nav.pl?page=menu&in=home", ENDITEM,
LAST);
web_reg_save_param("fID1",
"LB/IC=INPUT TYPE=\"hidden\" NAME=\"flightID\" VALUE=\"",
"RB=\"",
"ORD=1",
"Search=Body",
LAST);
web_image("Itinerary Button",
"Alt=Itinerary Button",
"Snapshot=t3.inf",
LAST);
strcpy(creq, "body=1=on&flightID=");
strcat(creq, lr_eval_string("{fID1}"));
strcat(creq, "&.cgifields=1");
strcat(creq, "&removeFlights.x=104&removeFlights.y=9");
lr_output_message(creq);
lr_think_time( 12 );
web_custom_request("itinerary.pl",
"url=http://192.168.8.9/MercuryWebTours/itinerary.pl",
"Method=POST",
"RecContentType=text/html",
"Snapshot=t7.inf",
"Mode=HTML",
creq,
LAST);
return 0;
}
但是用removeFlights.x=104&removeFlights.y=9根本不能提交成功;因为我一页有17条订单数据,要拖动滚动条到最底部,然后再点击cancel checked reservation 按钮提交删除操作。
但是让LR执行脚本时,LR不会拖动滚动条,再去执行removeFlights.x=104&removeFlights.y=9操作的话,这样鼠标就自然定位错了,所以执行时不能成功;
请问大家这个问题怎么解决?我先谢过各位了! |
|