Exemplo n.º 1
0
 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));
     int zeroBasedRowNumber = int.Parse(S.LastWords(rowElement.Current.Name, 1)[0]);
     Predicate<AutomationElement> cellPredicate = delegate(AutomationElement element)
                                                      {
                                                          string name = element.Current.Name;
                                                          return name.Contains(UIItemIdAppXmlConfiguration.Instance.TableCellPrefix) && zeroBasedRowNumber == int.Parse(S.LastWords(name, 2)[1]);
                                                      };
     List<AutomationElement> tableCellElements = customControlTypes.FindAll(cellPredicate);
     return new TableCells(tableCellElements, tableHeader, actionListener);
 }
Exemplo n.º 3
0
 public TableRow(AutomationElement automationElement, ActionListener actionListener, TableHeader tableHeader, TableCellFactory tableCellFactory)
     : base(automationElement, actionListener)
 {
     this.tableHeader = tableHeader;
     this.tableCellFactory = tableCellFactory;
 }
Exemplo n.º 4
0
 public TableRow(AutomationElement automationElement, ActionListener actionListener, TableHeader tableHeader, TableCellFactory tableCellFactory)
     : base(automationElement, actionListener)
 {
     this.tableHeader      = tableHeader;
     this.tableCellFactory = tableCellFactory;
 }
Exemplo n.º 5
0
 public virtual TableRows CreateRows(ActionListener actionListener, TableHeader tableHeader)
 {
     List<AutomationElement> rowElements = GetRowElements();
     return new TableRows(rowElements, actionListener, tableHeader, new TableCellFactory(automationElementFinder.AutomationElement, actionListener));
 }