Compartilhar via


WinListItem.Select Method

Selects the list item in the list or combo box.

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

Syntax

'Declaration
Public Sub Select
public void Select()
public:
void Select()
member Select : unit -> unit
public function Select()

Exceptions

Exception Condition
InvalidOperationException

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

Remarks

Example: Selects the list item in the list.

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

.NET Framework Security

See Also

Reference

WinListItem Class

Microsoft.VisualStudio.TestTools.UITesting.WinControls Namespace