|
- Dialog("Login").WinEdit("Agent Name:").Set "mercury"
- Dialog("Login").WinEdit("Password:").SetSecure "4f31c484579419918c5c9582b3adede9949df82f"
- Dialog("Login").WinButton("OK").Click
- Window("Flight Reservation").ActiveX("MaskEdBox").Type DataTable("Data_of_Flight", dtGlobalSheet)' 航班时间
- Window("Flight Reservation").WinComboBox("Fly From:").Select DataTable("FlyForm", dtGlobalSheet)' 起始点
- Window("Flight Reservation").WinComboBox("Fly To:").Select DataTable("FlyTo", dtGlobalSheet)' 终点站
- Window("Flight Reservation").WinButton("FLIGHT").Click' 查看航班
- ItemCount=Window("Flight Reservation").Dialog("Flights Table").WinList("From").GetItemsCount'取得航班列表的行数
- SelectItem=RandomNumber(0,ItemCount)'随机选取其中一项
- Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select SelectItem ' 选择航班列表信息
- Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
- Window("Flight Reservation").WinEdit("Name:").Set "jojo"' 订票人名字
- Window("Flight Reservation").WinButton("Insert Order").Click' 保存订票记录
- Wait 1'等待记录插入过程完成
- RecordNo= Window("Flight Reservation").WinEdit("Order No:").GetTOProperties("text")'取得订单记录号
- Window("Flight Reservation").WinButton("Button").Click' 打开订票记录
- Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Set "No"
- Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Type RecordNo '设置订单号
- Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click '确认订单
复制代码 运行时报不知为何报如下错误:
The test run cannot continue due to an unrecoverable error.
The "Order No:" WinEdit object was not found in the Object Repository.
Check the Object Repository to confirm that the object exists or to find the correct name for the object.
Line (1): "Dialog("Login").WinEdit("Agent Name:").Set "mercury"". |
|