UITestExtensions.Unit_SelectItem (System.Windows.Controls.ComboBox, System.Int32)
Function selects a specified item in a ComboBox
Namespace:SoftHai.Testing.UITestAssembly:SoftHai.Testing
Syntax
Visual Basic
<ExtensionAttribute()> _
Public Sub Unit_SelectItem( _
ByVal CB As System.Windows.Controls.ComboBox, _
ByVal pSelectedItemIndex As System.Int32 _
)
C#
[ExtensionAttribute()]
public void Unit_SelectItem(
this System.Windows.Controls.ComboBox CB,
System.Int32 pSelectedItemIndex
)
Parameter
CBType:
System.Windows.Controls.ComboBoxCurrent ComboBox
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#
ComboBox CB = new ComboBox();
...
CB.Unit_SelectItem(5);
Visual Basic
Dim CB as new ComboBox()
...
CB.Unit_SelectItem(5)
This WikiPage was created with
Codeplex WikiEditor