Gets the first child with a name that matches the regular expression given by the 'name' parameter

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

Syntax

C#
public virtual UIControlBase this[
	string name,
	bool useRegex
] { get; }
Visual Basic (Declaration)
Public Overridable ReadOnly Default Property Item ( _
	name As String, _
	useRegex As Boolean _
) As UIControlBase
Visual C++
public:
virtual property UIControlBase^ default[String^ name, bool useRegex] {
	UIControlBase^ get (String^ name, bool useRegex);
}

Parameters

name
Type: System..::.String
The pattern to match the children's names against
useRegex
Type: System..::.Boolean
If set to true, the 'name' parameter will be treated as regular expression. If set to false, it is identical to calling UIControl[name]

Return Value

If the name was found, the control with that name is returned, otherwise null

Examples

CopyC#
UIAListItem myFolder = null;
UIAListBox desktopWindowShortcuts = Desktop.UIA[@"Program Manager", @"Progman", @"UIAPane"][@"Desktop", @"SysListView32", @"1"] as UIAListBox;
myFolder = desktopWindowShortcuts["My*", true] as UIAListItem;
myFolder.DoubleClick();

See Also