Window("Flight Reservation").WinEdit("Order No:").Output CheckPoint("Order No:")'
Dim orderno'将生成的订单号输出,并保存在orderno中
Dialog("Login").WinEdit("Agent Name:").Set "admin"
Dialog("Login").WinEdit("Agent Name:").Type micTab
Dialog("Login").WinEdit("Password:").SetSecure "5821cef45dfb690625fcabfe5a8670de60f8b846"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").WinObject("Date of Flight:").Type "111216"
Window("Flight Reservation").WinComboBox("Fly From:").Select "Frankfurt"
Window("Flight Reservation").WinComboBox("Fly To:").Select "Los Angeles"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select "20329 FRA 07:12 AM LAX 02:23 PM AA $112.20"
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "lee"
Window("Flight Reservation").WinButton("Insert Order").Click
wait(15)
Window("Flight Reservation").WinEdit("Order No:").Output CheckPoint("Order No:")'
'msgbox datatable("Order_No",dtglobalsheet)
msgbox datatable("Order_No",dtglobalsheet)
orderno=datatable("Order_No",dtglobalsheet)
Window("Flight Reservation").WinButton("Button").Click
Window("Flight Reservation").WinMenu("Menu").Select "File;Open Order..."
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Set "ON"
Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Set orderno'将查询条件设置为刚刚生成的订单号
Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Output CheckPoint("Edit")'输出查询结果,比较是否一致
msgbox datatable("order2",dtglobalsheet)
If datatable("Order_No",dtglobalsheet)=datatable("order2",dtglobalsheet)Then
msgbox "sussesful"
else
msgbox "fail"
End If
Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click
Window("Flight Reservation").WinMenu("Menu").Select "File;Exit"