Esempio n. 1
0
        /// <summary>
        /// Finds the element which is in the given treescope with the given condition and the given index within the given timeout period.
        /// </summary>
        public AutomationElement FindAt(TreeScope treeScope, int index, ConditionBase condition, TimeSpan?timeout = null)
        {
            bool WhilePredicate(AutomationElement element) => element == null;
            AutomationElement RetryMethod() => FrameworkAutomationElement.FindIndexed(treeScope, index, condition);

            return(Retry.While(RetryMethod, WhilePredicate, timeout));
        }
 /// <summary>
 /// Finds the element which is in the given treescope with the given condition and the given index.
 /// </summary>
 public SHAutomationElement FindAt(TreeScope treeScope, int index, ConditionBase condition)
 {
     try
     {
         return(FrameworkAutomationElement.FindIndexed(treeScope, index, condition));
     }
     catch (System.Runtime.InteropServices.COMException)
     {
         return(null);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Finds the element which is in the given treescope with the given condition and the given index.
 /// </summary>
 public AutomationElement FindAt(TreeScope treeScope, int index, ConditionBase condition)
 {
     return(FrameworkAutomationElement.FindIndexed(treeScope, index, condition));
 }