UITestExtensions.Unit_SelectItem (System.Windows.Controls.ComboBox, System.Int32)

Function selects a specified item in a ComboBox

Namespace:SoftHai.Testing.UITest
Assembly: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

CB
Type:System.Windows.Controls.ComboBox
Current ComboBox
pSelectedItemIndex
Type:System.Int32
Of 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

Last edited Jul 19, 2010 at 10:02 AM by SoftHai, version 1

Comments

No comments yet.