예제 #1
0
        public override List<AutomationElement> Filter(List<AutomationElement> automationElements)
        {
            if (automationElements.Count <= index)
                throw new AutomationElementSearchException(
                    string.Format("No item with index {0}. Number of items available {1}", index, automationElements.Count));

            var automationElementAutomationElementPositionComparer = new AutomationElementPositionComparer();
            automationElements.Sort(automationElementAutomationElementPositionComparer);

            var list = new List<AutomationElement> {automationElements[index]};
            return list;
        }
예제 #2
0
        public override List <AutomationElement> Filter(List <AutomationElement> automationElements)
        {
            if (automationElements.Count <= index)
            {
                throw new AutomationElementSearchException(
                          string.Format("No item with index {0}. Number of items available {1}", index, automationElements.Count));
            }

            var automationElementAutomationElementPositionComparer = new AutomationElementPositionComparer();

            automationElements.Sort(automationElementAutomationElementPositionComparer);

            var list = new List <AutomationElement> {
                automationElements[index]
            };

            return(list);
        }