如何根據(jù)判斷結(jié)果選擇執(zhí)行特定操作
例如我進(jìn)入Itinerary頁面如果發(fā)現(xiàn)有訂單記錄則Center All,否則不進(jìn)行操作
我的腳本是這樣的,根據(jù)output結(jié)果來看,if命令的判斷結(jié)果沒有問題,但是訂單沒有刪除掉
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");
????}