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; }
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); }