Select a UIATreeItem by its Name

Namespace:  QAliber.Engine.Controls.UIA
Assembly:  QAliber.Engine (in QAliber.Engine.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public void Select(
	string name
)
Visual Basic (Declaration)
Public Sub Select ( _
	name As String _
)
Visual C++
public:
virtual void Select(
	String^ name
) sealed

Parameters

name
Type: System..::.String
Name of the tree item as it reflect in Name property

Examples

CopyC#
UIAWindow vsWin = Desktop.UIA["Visual Studio", true] as UIAWindow;
 UIATree solutionTree = vsWin[@"Solution Explorer",true][@"", @"VsUIHierarchyBaseWin", @"UIAPane"][@"Solution Explorer", @"SysTreeView32", @"UIATree"] as UIATree;
 solutionTree.Select("References");
 solutionTree.Select(2);
 for (int idx = 0 ; idx < solutionTree.SelectedItems.Length ; idx++)
     MessageBox.Show(solutionTree.SelectedItems[idx].Name);

See Also