| || |
Select Text From 2nd Column in WinListView
I am extremely new to QTP and am having trouble selecting text from a 2nd column.
The object type is WinListView and the code I am trying to use is a simple:
VbWindow("frmMain").VbWindow("frmNewBizWiz").WinLi stView("ListView20WndClass").Select "Praxis Private Wealth (GBP)"
When I run the test the error message "Specify the item is included in objects list collection" is displayed.
The test runs fine if I use .Select "GPE" as the text GPE appears in the 1st column, however all items in the list have "GPE" in the first column.
Many thanks in advance to anyone that can help. [img]/images/graemlins/laugh.gif[/img]
Re: Select Text From 2nd Column in WinListView
Here you go:
<font class="small">Code:</font><hr /><pre>
Public Function SelectSubItem (obj, column_name, list_item)
Dim Tot_Items, Image_Name
Tot_Items = obj.GetItemsCount
For row = 1 to Tot_Items
Image_Name = obj.GetSubItem (row, column_name)
If ( Image_Name = list_item ) Then