public void CopyCommandCallsTo(Row detailRow) { int columnIndex = 0; foreach (Element cell in detailRow.GetCells()) { CommandCall cellCall; if (CommandCallByColumn.TryGetValue(columnIndex, out cellCall)) { cellCall.Element = cell; } columnIndex++; } }
private void PopulateCommandCallByColumnMap() { Row headerRow = GetLastHeaderRow(); CommandCallList children = TableCommandCall.Children; foreach (CommandCall childCall in children) { int columnIndex = headerRow.GetIndexOfCell(childCall.Element); if (columnIndex == -1) { throw new Exception("Commands must be placed on <th> elements when using 'execute' or 'verifyRows' commands on a <table>."); } CommandCallByColumn.Add(columnIndex, childCall); } }