public TableCells(ICollection tableCellElements, TableHeader tableHeader, ActionListener actionListener) { this.tableHeader = tableHeader; foreach (AutomationElement tableCellElement in tableCellElements) { Add(new TableCell(tableCellElement, actionListener)); } }
public virtual TableCells CreateCells(TableHeader tableHeader, AutomationElement rowElement) { if (customControlTypes == null) customControlTypes = new AutomationElementFinder(tableElement).Descendants(AutomationSearchCondition.ByControlType(ControlType.Custom)); string rowNameSuffix = " " + rowElement.Current.Name; Predicate<AutomationElement> cellPredicate = element => { string name = element.Current.Name; return name.EndsWith(rowNameSuffix); }; List<AutomationElement> tableCellElements = customControlTypes.FindAll(cellPredicate); return new TableCells(tableCellElements, tableHeader, actionListener); }
public virtual TableRows CreateRows(IActionListener actionListener, TableHeader tableHeader) { List<AutomationElement> rowElements = GetRowElements(); return new TableRows(rowElements, actionListener, tableHeader, new TableCellFactory(automationElementFinder.AutomationElement, actionListener)); }
public TableRow(AutomationElement automationElement, ActionListener actionListener, TableHeader tableHeader, TableCellFactory tableCellFactory) : base(automationElement, actionListener) { this.tableHeader = tableHeader; this.tableCellFactory = tableCellFactory; }
public TableRow(AutomationElement automationElement, ActionListener actionListener, TableHeader tableHeader, TableCellFactory tableCellFactory) : base(automationElement, actionListener) { this.tableHeader = tableHeader; this.tableCellFactory = tableCellFactory; }