| || |
I have a DotNetListView which seems to be impenetrable. The object’s first column is an icon and the remaining 4 columns are text. When I traverse the object like this:
Set t = DotNETListView("Name=listViewMessages")
Set its = t.items
i = 1
For Each o In its
Debug.Print "o: " & i & " -- """ & o.Item(1) & """, " & o.Item(2)
i = i + 1
I have already determined there are only 2 properties: Selected, and Text. Selected is correctly set but Text is always empty. When trying to traverse the DotNetListView contents with the Object Map / Content Check the results are the same: only 2 properties: Selected and Text, and the text is always blank, despite there being 5 columns.
I have another DotNetListView in the application I’m testing, but it works correctly. Could it have something to do with an icon being in the DotNetListView?
I'm using TestPartner 5.4.0 Build 180.
Any help would be appreciated. Thanks.
Try using the GetItem method to obtain the text in each cell of the listview
For example, if you are interested in the text in the second row, third column, you can retrieve it with:
CellText = t.GetItem(2, 3)