List view items
Hi everyone,
I'm new to TestComplete and i'm having problems with list view control. I am using TestComplete to test .NET based application.
Issue:
I'm trying to find a specific item in list view control and I was helping with the example on this link: https://support.smartbear.com/viewarticle/24752/
--
Function checkValueExists(listView, value)
Dim i, j
For i = 0 To listView.Columns.Count - 1
For j = 0 To listView.Items.Count - 1
If listView.Items(j,i) = value Then
checkValueExists = True
Exit Function
End If
Next
Next
checkValueExists = False
End Function
---
When using this function it gives back an error:
Wrong number of arguments or invalid property assignment: 'listView.Items'
The example provided is using extended properties of the listview item and your code is not.
The error message you are receiving is correct.
You need to trace it to the line of code that is generating the error and verify that you are passing the correct number of parameters to the property or method.
More than likely this is incorrect:
If listView.Items(j,i) = value Then
Try using the object spy to verify the number of parameters accepted by listView.Items (and that it is actually the property you want to check).