public final MapArray<String, ICell> getRow(String rowName) { try { int colsCount = table.columns().count(); List<WebElement> webRowLine = timer().getResultByCondition( () -> getLineAction(rowName), els -> els.size() == colsCount); List<String> headers = table.columns().headers(); if (webRowLine.size() != headers.size() || headers.size() != table.columns().headers().size() || headers.size() == 0) throw exception("Can't getRow" + rowName); return new MapArray<>(colsCount, table.columns().headers()::get, value -> table.cell(webRowLine.get(value), new Column(headers.get(value)), new Row(rowName))); } catch (Exception | Error ex) { throw throwRowsException(rowName, ex.getMessage()); } }
public final MapArray<String, ICell> getRow(String rowName) { try { int colsCount = table.columns().count(); List<String> headers = table.columns().headers(); List<WebElement> webRowLine = timer().getResultByCondition( () -> getLineAction(rowName), els -> els.size() == colsCount); return new MapArray<>(colsCount, headers::get, value -> table.cell(webRowLine.get(value), new Column(headers.get(value)), new Row(rowName))); } catch (Exception | Error ex) { throw throwRowsException(rowName, ex.getMessage()); } }
public final MapArray<String, ICell> getRow(String rowName) { try { int colsCount = table.columns().count(); List<String> headers = table.columns().headers(); List<WebElement> webRowLine = timer().getResultByCondition( () -> getLineAction(rowName), els -> els.size() == colsCount); return new MapArray<>(colsCount, headers::get, value -> table.cell(webRowLine.get(value), new Column(headers.get(value)), new Row(rowName))); } catch (Exception | Error ex) { throw throwRowsException(rowName, ex.getMessage()); } }
public MapArray<String, ICell> getRow(int rowNum) { if (count() < 0 || count() < rowNum || rowNum <= 0) throw exception("Can't Get Row '%s'. [num] > ColumnsCount(%s).", rowNum, count()); try { int colsCount = table.columns().count(); List<WebElement> webRow = timer().getResultByCondition( () -> getLineAction(rowNum), els -> els.size() == colsCount); return new MapArray<>(colsCount, key -> table.columns().headers().get(key), value -> table.cell(webRow.get(value), new Column(value + 1), new Row(rowNum))); } catch (Exception | Error ex) { throw throwRowsException(Integer.toString(rowNum) + "", ex.getMessage()); } }
public MapArray<String, ICell> getRow(int rowNum) { if (rowNum <= 0) throw exception("Table indexes starts from 1"); if (count() < 0 || count() < rowNum || rowNum <= 0) throw exception("Can't Get Row '%s'. [num] > ColumnsCount(%s).", rowNum, count()); try { int colsCount = table.columns().count(); List<WebElement> webRow = timer().getResultByCondition( () -> getLineAction(rowNum), els -> els.size() == colsCount); return new MapArray<>(colsCount, key -> table.columns().headers().get(key), value -> table.cell(webRow.get(value), new Column(value + 1), new Row(rowNum))); } catch (Exception | Error ex) { throw throwRowsException(Integer.toString(rowNum) + "", ex.getMessage()); } }
public MapArray<String, ICell> getRow(int rowNum) { if (rowNum <= 0) throw exception("Table indexes starts from 1"); if (count() < 0 || count() < rowNum || rowNum <= 0) throw exception("Can't Get Row '%s'. [num] > ColumnsCount(%s).", rowNum, count()); try { int colsCount = table.columns().count(); List<WebElement> webRow = timer().getResultByCondition( () -> getLineAction(rowNum), els -> els.size() == colsCount); return new MapArray<>(colsCount, key -> table.columns().headers().get(key), value -> table.cell(webRow.get(value), new Column(value + 1), new Row(rowNum))); } catch (Exception | Error ex) { throw throwRowsException(Integer.toString(rowNum) + "", ex.getMessage()); } }