TA的每日心情 | 奋斗 2022-7-13 15:22 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
Window("Flight Reservation").ActiveX("MaskEdBox").Type "111111"
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 "20330 FRA 08:12 AM LAX 03:23 PM AA $112.20"
Window("Flight Reservation").Dialog("Flights Table").WinList("From").GetItem(0)
Dim CountItem
CountItem=Window("Flight Reservation").Dialog("Flights Table").WinList("From").GetItemsCount
reporter.ReportEvent 2,"counting", CountItem & "项"
For i=0to CountItem-1
reporter.ReportEvent 2,"Item内容:",Window("Flight Reservation").Dialog("Flights Table").WinList("From").GetItem (i)
Next
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "aa"
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").WinMenu("Menu").Select "File;Exit"
希望对你有帮助:
下标从0开始,一共***WinList("From").GetItemsCount-1项
WinList("From").GetItem (0) 取出后
用split函数 对字符串进行分割成数组
把数组元素与对应的“Flight No:” 等各项对应比较就可以了
自己动手试试看
[ 本帖最后由 rivermen 于 2007-6-7 17:14 编辑 ] |
|