Select a list item 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 item as it appears on the list

Examples

CopyC#
System.Diagnostics.Process.Start("notepad");
UIAWindow notepadWin = Desktop.UIA[@"Untitled - Notepad", @"Notepad", @"UIAWindow"] as UIAWindow;
UIDocument doc = notepadWin[@"", @"Edit", @"15"] as UIDocument;
doc.Write("{LeftAlt}of");
UIAWindow fontWin = notepadWin[@"Font", @"#32770", @"UIAWindow"] as UIAWindow;
UIAListBox sizeList = fontWin[@"Size:", @"ComboBox", @"1138"][@"Size:", @"ComboLBox", @"ListBox"] as UIAListBox;
sizeList.Select("20");
fontWin[@"OK", @"Button", @"1"].Click();
doc.Write("Text size is 20");

See Also