如何根据判断结果选择执行特定操作
例如我进入Itinerary页面如果发现有订单记录则Center All,否则不进行操作
我的脚本是这样的,根据output结果来看,if命令的判断结果没有问题,但是订单没有删除掉
if(strstr(lr_eval_string("{center}"),"No flights")==NULL)
{
lr_output_message("CenterAll");
lr_start_transaction("3_cancelAll");
web_submit_data("itinerary.pl",
"Action=http://127.0.0.1:1080/cgi-bin/itinerary.pl",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/cgi-bin/itinerary.pl",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=flightID", "Value=25145-7-JB", ENDITEM,
"Name=flightID", "Value=251445974-1562-JB", ENDITEM,
"Name=.cgifields", "Value=1", ENDITEM,
"Name=.cgifields", "Value=2", ENDITEM,
"Name=removeAllFlights.x", "Value=48", ENDITEM,
"Name=removeAllFlights.y", "Value=18", ENDITEM,
LAST);
lr_end_transaction("3_cancelAll",LR_AUTO);
}
else
{
lr_output_message("No scheduled in Flight List");
}