|
在用flight4a做一个订票删除时,需要统计订票数量,然后用力GetItemsCount函数,但是运行时出现报错,报错信息如下:对象不支持此属性或方法: 'GetItemsCount'
Line (11): "IntNumber_SearchResult=Window("Flight Reservation").Dialog("Open Order").Dialog("Search Results").Static("Flight No.").GetItemsCount".
请教下各位大神,应该如何修改?
全部程序如下:
Dialog("Login").WinEdit("Agent Name:").Set "mercury"
Dialog("Login").WinEdit("Password:").SetSecure "547591efd519f38b5db54b7d61c46fa8984c4c9e"
Dialog("Login").WinButton("OK").Click
Dim IntNumber_SearchResult,Str_SearchResult
Dim Delete_OrderNO
Window("Flight Reservation").WinMenu("Menu").Select "File;Open Order..."
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Customer Name").Set "ON"
Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Set "fengjh"
Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click
While Window("Flight Reservation").Dialog("Open Order").Dialog("Search Results").Exist(5)
IntNumber_SearchResult=Window("Flight Reservation").Dialog("Open Order").Dialog("Search Results").Static("Flight No.").GetItemsCount
Str_SearchResult=Window("Flight Reservation").Dialog("Open Order").Dialog("Search Results").Static("Flight No.").Get(RandomNumber(0,IntNumber_SearchResult-1))
Window("Flight Reservation").Dialog("Open Order").Dialog("Search Results").Static("Flight No.").Select Str_SearchResult
Window("Flight Reservation").Dialog("Open Order").Dialog("Search Results").WinButton("OK").Click
Delete_OrderNO=Window("Flight Reservation").WinEdit("Order No:").GetROProperty("text")
Window("Flight Reservation").WinButton("Delete Order").Click
Window("Flight Reservation").Dialog("Flight Reservations").WinButton("是(Y)").Click
Reporter.ReportEvent micPass,"删除的订单号是:"&Delete_OrderNO,"删除的订单是:"&Str_SearchResult
Window("Flight Reservation").WinMenu("Menu").Select "File;Open Order..."
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Customer Name").Set "ON"
Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Set "fengjh"
Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click
Wend
Window("Flight Reservation").Dialog("Open Order").Dialog("Flight Reservations").WinButton("确定").Click
Window("Flight Reservation").Dialog("Open Order").WinButton("Cancel").Click
Reporter.ReportEvent micPass,"删除订单成功","订单查询不到,说明删除成功或者本身没有订单"
|
|