UITestExtensions.Unit_SelectItem (System.Windows.Controls.ListBox, System.Int32)
Function selects a specified item in a ListBox
Namespace:SoftHai.Testing.UITestAssembly:SoftHai.Testing
Syntax
Visual Basic
<ExtensionAttribute()> _
Public Sub Unit_SelectItem( _
ByVal LB As System.Windows.Controls.ListBox, _
ByVal pSelectedItemIndex As System.Int32 _
)
C#
[ExtensionAttribute()]
public void Unit_SelectItem(
this System.Windows.Controls.ListBox LB,
System.Int32 pSelectedItemIndex
)
Parameter
LBType:
System.Windows.Controls.ListBoxCurrent ListBox
pSelectedItemIndexType:
System.Int32Of the item to be selected
Remarks
Example
First, the namespace is imported, so that the extension methods are available:
C#
using SoftHai.Testing.UITest;
Visual Basic
Imports SoftHai.Testing.UITest
Subsequently, the extension method be used as follows:
C#
ListBox LB = new ListBox();
...
LB.Unit_SelectItem(5);
Visual Basic
Dim LB as new ListBox()
...
LB.Unit_SelectItem(5)
This WikiPage was created with
Codeplex WikiEditor