コード例 #1
0
        public static IUiElement PerformNavigateToLastChild(this IUiElement element)
        {
            IUiElement result = null;

            classic.TreeWalker walker = new classic.TreeWalker(classic.Condition.TrueCondition);

            try {
                result = AutomationFactory.GetUiElement(walker.GetLastChild(element.GetSourceElement() as classic.AutomationElement));
            } catch {
            }

            return(result);
        }
コード例 #2
0
        public static IUiElement PerformNavigateToLastChild(this IUiElement element)
        {
            IUiElement result = null;

            classic.TreeWalker walker = new classic.TreeWalker(classic.Condition.TrueCondition);

            try {
                result = AutomationFactory.GetUiElement(walker.GetLastChild(element.GetSourceElement() as classic.AutomationElement));
            } catch {
            }

            return result;
        }
コード例 #3
0
        protected void GetAutomationElementsChildren(IUiElement inputObject, bool firstChild)
        {
            if (!CheckAndPrepareInput(this))
            {
                return;
            }

            var walker =
                new classic.TreeWalker(
                    classic.Condition.TrueCondition);

            IUiElement sibling =
                firstChild ?
                AutomationFactory.GetUiElement(walker.GetFirstChild(inputObject.GetSourceElement() as classic.AutomationElement)) :
                AutomationFactory.GetUiElement(walker.GetLastChild(inputObject.GetSourceElement() as classic.AutomationElement));

            WriteObject(this, sibling);
        }
コード例 #4
0
 protected void GetAutomationElementsChildren(IUiElement inputObject, bool firstChild)
 {
     if (!CheckAndPrepareInput(this)) { return; }
     
     var walker = 
         new classic.TreeWalker(
             classic.Condition.TrueCondition);
     
     IUiElement sibling =
         firstChild ?
             AutomationFactory.GetUiElement(walker.GetFirstChild(inputObject.GetSourceElement() as classic.AutomationElement)) :
                 AutomationFactory.GetUiElement(walker.GetLastChild(inputObject.GetSourceElement() as classic.AutomationElement));
     
     WriteObject(this, sibling);
 }