Are you trying to retrieve the selection from your object (not sure what your AutomationPatern is and why would you do it that way)? If so then you could use next code to get it:
This should return the value of the selected item.
Or you can use next to identify your objects and then select the item you want:
Code:
Window().WpfWindow().WpfList().GetSelection
This should return the value of the selected item.
Or you can use next to identify your objects and then select the item you want:
Code:
Set yourList = indow().WpfWindow().WpfList("description")
'read the list items and find the 'recordYouNeed':
listItemsCounter = yourList.GetItemsCount
For i = 1 To listItemsCounter
'retrieve items values:
itemValue = yourList.GetItem(i)
itemSelection = yourList.GetSelection
'check if retrieved item's value is the expected one:
If itemValue = "recordYouNeed" Then
yourList.Select itemValue 'select the item you need
Reporter.ReportEvent micPass, "The record 'recordYouNeed' successfully found and selected", "more details if needed"
Exit For
ElseIf itemValue <> "recordYouNeed" and i = listItemsCounter-1 Then
Reporter.ReportEvent micFail, "Could not find the record 'recordYouNeed'", "more details if needed"
ExitTest
End If
Next