Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WpfListItem::Select Method ()

 

Selects the list item in the list or combo box.

Namespace:   Microsoft.VisualStudio.TestTools.UITesting.WpfControls
Assembly:  Microsoft.VisualStudio.TestTools.UITesting (in Microsoft.VisualStudio.TestTools.UITesting.dll)

public:
void Select()

Exception Condition
InvalidOperationException

The list item is not part of a list or a combo box control.

Example: Selects the list item in the list.

This is same as myList.SelectedItems = new string[] { myListItem.Name }; myListItem.Select();

Return to top
Show: