public GetFirstResult ( Query query, System.TimeSpan timeout ) : |
||
query | Query | The query. |
timeout | System.TimeSpan | The maximum amount of time to wait for the required element to become available. |
return |
public override AutomationElement GetFirstResult(Query query, TimeSpan timeout)
{
Debug.WriteLine("FirstResult - " + query, "UIAutomation-SearchEngine-Default");
var root = query.Root;
var scope = query.Scope;
var conditions = query.Conditions;
return (AutomationElement) ExecuteGetResult(() => root.FindFirst(scope, conditions), timeout);
}