User Magda B ( posted:

Hi there,
Does anybody know how to find an item in a listview.
The listview I tried, is the project detail, from the right panel of
Rational Administrator.
I tried this:

Sub Main
Dim Result As Integer
Dim vValue As String

'Initially Recorded: 7/24/00 11:05:38 AM
'Script Name: listview

Window SetContext, "Caption=Rational Administrator", ""
vValue = ""
Result = SQAGetProperty(".\", "Recognition", vValue)
Msgbox "value is " &vValue

Window SetContext, "Caption=Rational Administrator", ""
ListView Click, "ObjectIndex=1;\;ItemText=DaveRRT_sanity", "Coords=24,5"

Result = SQAGetProperty(".\;Type=ListView;ObjectIndex=1", "Recognition",
'Msgbox "Now the value is " &vValue

ListView Click, "ObjectIndex=1;\;ItemText=DaveRRT_sanity", "Coords=34,3"
Result =
SQAGetProperty(".\;Type=ListView;ObjectIndex=1;\;I temText=DaveRRT_sanity",
"Recognition", vValue)
'Msgbox "And Now the value is " &vValue

Window SetContext, "CurrentWindow", ""

If SQAFindObject(vValue) = sqaSuccess Then
'If SQAFindObject(".\;Type=LVItem;ItemText=DaveRRT_san ity") = sqaSuccess
Then 'I tried this too
Result = sqaPass
Msgbox "Found Rec " &vValue

Result = sqaFail
Msgbox "not found right obj " &vValue
End If

End Sub

The result is failure:
Msgbox "not found right obj Type=LVItem;ItemText=DaveRRT_sanity"

even if it recognized the item as being:
Any input is greatly apreciated.
Thanks in advance,