/// <summary> /// Finds all elements in the given treescope and with the given condition within the given timeout. /// </summary> public AutomationElement[] FindAll(TreeScope treeScope, ConditionBase condition, TimeSpan timeOut) { Predicate <AutomationElement[]> whilePredicate = elements => elements.Length == 0; Func <AutomationElement[]> retryMethod = () => BasicAutomationElement.FindAll(treeScope, condition); return(Retry.While(retryMethod, whilePredicate, timeOut)); }
/// <summary> /// Finds all elements in the given treescope and condition within the given timeout. /// </summary> public AutomationElement[] FindAll(TreeScope treeScope, ConditionBase condition, TimeSpan timeOut) { Predicate <AutomationElement[]> shouldRetry = elements => elements.Length == 0; Func <AutomationElement[]> func = () => BasicAutomationElement.FindAll(treeScope, condition); return(Retry.For(func, shouldRetry, timeOut)); }