private WebElement _webTable;
public WebTable(WebElement webTable)
public WebElement get_webTable() {
public void set_webTable(WebElement _webTable) {
this._webTable = _webTable;
public int getRowCount() {
List<WebElement> tableRows = _webTable.findElements(By.tagName("tr"));
public int getColumnCount() {
List<WebElement> tableRows = _webTable.findElements(By.tagName("tr"));
WebElement headerRow = tableRows.get(0);
List<WebElement> tableCols = headerRow.findElements(By.tagName("td"));
public WebElement getCellEditor(int rowIdx, int colIdx, int editorIdx) {
List<WebElement> tableRows = _webTable.findElements(By.tagName("tr"));
WebElement currentRow = tableRows.get(rowIdx-1);
List<WebElement> tableCols = currentRow.findElements(By.tagName("td"));
WebElement cell = tableCols.get(colIdx-1);
WebElement cellEditor = cell.findElements(By.tagName("input")).get(editorIdx);
} catch (NoSuchElementException e) {
throw new NoSuchElementException("Failed to get cell editor");