public String rowName() { return (rowName != null && !rowName.equals("")) ? rowName : table.rows().headers().get(rowNum - 1); }
public String rowName() { return (rowName != null && !rowName.equals("")) ? rowName : table.rows().headers().get(rowNum - 1); }
public List<ICell> getCells() { List<ICell> result = new ArrayList<>(); for (String columnName : columns().headers()) //it was so // columns().headers().forEach(rowName-> result.add(cell(columnName, rowName))) rows().headers().forEach(rowName -> result.add(cell(columnName, rowName))); if (cache) allCells = result; return result; }
public List<ICell> getCells() { List<ICell> result = new ArrayList<>(); for (String columnName : columns().headers()) //it was so // columns().headers().forEach(rowName-> result.add(cell(columnName, rowName))) rows().headers().forEach(rowName -> result.add(cell(columnName, rowName))); if (cache) allCells = result; return result; }
private int getRowIndex(String name) { int nameIndex; List<String> headers = select(rows().headers(), String::toLowerCase); String lName = name.toLowerCase(); if (headers != null && headers.contains(lName)) nameIndex = headers.indexOf(lName); else throw exception("Can't Get Row: '%s'. Available RowHeaders: (%s)", name, print(headers, ", ", "'%s'")); return nameIndex + rows().getStartIndex(); }
private int getRowIndex(String name) { int nameIndex; List<String> headers = rows().headers(); if (headers != null && headers.contains(name)) nameIndex = headers.indexOf(name); else throw exception("Can't Get Row: '%s'. Available RowHeaders: (%s)", name, print(headers, ", ", "'{0}'")); return nameIndex + rows().getStartIndex(); }
public ICell cellContains(String value, Row row) { int rowNum = row.hasName() ? rows().headers().indexOf(row.getName()) + 1 : row.getNum(); return rows().getRow(rowNum).first((name, cell) -> cell.getValue().contains(value)); } public ICell cellMatch(String regex, Row row) {
public ICell cell(WebElement webElement, Column column, Row row) { return addCell(webElement, column.get(name -> columns().headers().indexOf(name) + 1, num -> num), row.get(name -> rows().headers().indexOf(name) + 1, num -> num), column.get(name -> name, num -> ""), row.get(name -> name, num -> "")); }
public ICell cell(WebElement webElement, Column column, Row row) { return addCell(webElement, column.get(columnName -> columns().headers().indexOf(columnName) + 1, num -> num), row.get(rowName -> rows().headers().indexOf(rowName) + 1, num -> num), column.get(columnName -> columnName, num -> ""), row.get(rowName -> rowName, num -> "")); }
public ICell cell(String value, Row row) { int rowNum = row.hasName() ? rows().headers().indexOf(row.getName()) + 1 : row.getNum(); return rows().getRow(rowNum).first((rowName, cell) -> cell.getValue().equals(value)); } public ICell cellContains(String value, Row row) {
public ICell cellContains(String value, Row row) { int rowNum = row.hasName() ? rows().headers().indexOf(row.getName()) + 1 : row.getNum(); return rows().getRow(rowNum).first((rowName, cell) -> cell.getValue().contains(value)); } public ICell cellMatch(String regex, Row row) {
public ICell cell(WebElement webElement, Column column, Row row) { return addCell(webElement, column.get(columnName -> columns().headers().indexOf(columnName) + 1, num -> num), row.get(rowName -> rows().headers().indexOf(rowName) + 1, num -> num), column.get(columnName -> columnName, num -> ""), row.get(rowName -> rowName, num -> "")); }
public ICell cell(String value, Row row) { int rowNum = row.hasName() ? rows().headers().indexOf(row.getName()) + 1 : row.getNum(); return rows().getRow(rowNum).first((name, cell) -> cell.getValue().equals(value)); } public ICell cellContains(String value, Row row) {
public final MapArray<String, ICell> getColumn(String colName) { try { int rowsCount = table.rows().count(); List<String> headers = select(table.rows().headers(), String::toLowerCase); List<WebElement> webColumn = timer().getResultByCondition( () -> getLineAction(colName), els -> els.size() == rowsCount); return new MapArray<>(rowsCount, headers::get, value -> table.cell(webColumn.get(value), new Column(colName), new Row(headers.get(value)))); } catch (Exception | Error ex) { throw throwColumnException(colName, ex.getMessage()); } }
public ICell cell(Column column, Row row) { int colIndex = column.get(this::getColumnIndex, num -> num + columns().getStartIndex() - 1); int rowIndex = row.get(this::getRowIndex, num -> num + rows().getStartIndex() - 1); return addCell(colIndex, rowIndex, column.get(columnName -> columns().headers().indexOf(columnName) + 1, num -> num), row.get(rowName -> rows().headers().indexOf(rowName) + 1, num -> num), column.get(columnName -> columnName, num -> ""), row.get(rowName -> rowName, num -> "")); }
public ICell cell(Column column, Row row) { int colIndex = column.get(this::getColumnIndex, num -> num + columns().getStartIndex() - 1); int rowIndex = row.get(this::getRowIndex, num -> num + rows().getStartIndex() - 1); return addCell(colIndex, rowIndex, column.get(columnName -> columns().headers().indexOf(columnName) + 1, num -> num), row.get(rowName -> rows().headers().indexOf(rowName) + 1, num -> num), column.get(columnName -> columnName, num -> ""), row.get(rowName -> rowName, num -> "")); }
public ICell cell(Column column, Row row) { int colIndex = column.get(this::getColumnIndex, num -> num + columns().getStartIndex() - 1); int rowIndex = row.get(this::getRowIndex, num -> num + rows().getStartIndex() - 1); return addCell(colIndex, rowIndex, column.get(name -> columns().headers().indexOf(name) + 1, num -> num), row.get(name -> rows().headers().indexOf(name) + 1, num -> num), column.get(name -> name, num -> ""), row.get(name -> name, num -> "")); }
@Override protected String getTextAction() { return "||X||" + print(columns().headers(), "|") + "||\n" + print(select(rows().headers(), rowName -> "||" + rowName + "||" + print(rowValue(rowName), "|") + "||"), "\n"); }
@Override protected String getTextAction() { return "||X||" + print(columns().headers(), "|") + "||\n" + print(select(rows().headers(),rowName -> "||" + rowName + "||" + print(rowValue(rowName), "|") + "||"), "\n"); }
@Override protected String getTextAction() { return "||X||" + print(columns().headers(), "|") + "||\n" + print(select(rows().headers(),rowName -> "||" + rowName + "||" + print(rowValue(rowName), "|") + "||"), "\n"); }