- Window("Window").Activate
- Dim Columns(10)
- Set obj = Window("Window").Window("Window").WinListView("巡更点信息")
- Col= Obj.ColumnCount()
- '获取列表标题栏的信息
- For i = 0 To Col - 1
- Col(i) = Obj.GetColumnHeader(i)
- print "Col("& i & ")" & Col(i)
- Next
- '获取列表中的所有信息
- n = Obj.GetItemsCount
- For i = 0 To n - 1
- print "i = " & i
- str =i+1 & vbCr
- For j =0 To Col - 1
- str = str & Obj.GetSubItem(i ,Col(j)) & vbCr
- print str
- Next
- Next
- Set obj = nothing
【QTP】获取WinListView表中所有信息
最新推荐文章于 2022-03-02 12:24:27 发布