Retrieve list of controls within requested scope relative to this control, and has the requested properties values.

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

Syntax

C#
public List<UIControlBase> FindAll(
	TreeScope scope,
	string[] properties,
	Object[] values
)
Visual Basic (Declaration)
Public Function FindAll ( _
	scope As TreeScope, _
	properties As String(), _
	values As Object() _
) As List(Of UIControlBase)
Visual C++
public:
List<UIControlBase^>^ FindAll(
	TreeScope scope, 
	array<String^>^ properties, 
	array<Object^>^ values
)

Parameters

scope
Type: System.Windows.Automation..::.TreeScope
Level of search up or down the conrols tree
properties
Type: array< System..::.String >[]()[]
Property of the control to search by
values
Type: array< System..::.Object >[]()[]
The expected value of the requested property

Return Value

UIControl[] with the matching properties found withing the expected scope or null if controls not found

Examples

CopyC#
UIAPane programManager = Desktop.UIA[@"Program Manager", @"Progman", @"UIAPane"] as UIAPane;
 FindProperties [] props = new FindProperties[]{FindProperties.Visible,FindProperties.Type};
 object [] vals = new object[]{true,"UIAListItem"};
 //Since shortcuts is 2 level below the scope is Descendants
 UIControl [] myShortcuts = programManager.FindAll(
                   System.Windows.Automation.TreeScope.Descendants,
                   props, vals) ;

 if (myShortcuts != null)//not found above
     myShortcuts[0].DoubleClick();
 else
     MessageBox.Show("shortcut Not found");

See Also