C# Class Automation.UI.Tree.SearchEngines.TreeWalkerSearchEngine

Implementation of the search engine interface that uses a tree walker to find matching nodes. The tree walker will search the UI automation tree in a breadth first order.
Inheritance: SearchEngine
Show file Open project: vijayakumarsuraj/UIAutomation

Public Methods

Method Description
GetAllResults ( Query query, System.TimeSpan timeout ) : IEnumerable

Gets all the automation elements found using the condition specified in the specified query.

GetFirstResult ( Query query, System.TimeSpan timeout ) : AutomationElement

Gets the first result for the specified query.

Private Methods

Method Description
ExecuteWithChildren ( AutomationElement root, WithElementCallback callback ) : object

Calls the specified callback for each child of the specified node.

ExecuteWithDescendants ( AutomationElement root, WithElementCallback callback ) : object

Calls the specified callback for each descendant of the specified node.

Method Details

GetAllResults() public method

Gets all the automation elements found using the condition specified in the specified query.
public GetAllResults ( Query query, System.TimeSpan timeout ) : IEnumerable
query Query The query.
timeout System.TimeSpan The maximum amount of time to wait for at least one element to become available.
return IEnumerable

GetFirstResult() public method

Gets the first result for the specified query.
public GetFirstResult ( Query query, System.TimeSpan timeout ) : AutomationElement
query Query The query.
timeout System.TimeSpan The maximum amount of time to wait for the required element to become available.
return System.Windows.Automation.AutomationElement