public interface SeleniumTable extends Iterable<SeleniumTableRow>, ElementContainer
| Modifier and Type | Method and Description |
|---|---|
SeleniumTable |
body()
Gets a table containing the
tbody content. |
SeleniumTable |
foot()
Gets a table containing the
tfoot content. |
SeleniumTableRow |
get(int rowIndex)
Gets an individual table row by its index in the rows in this table
|
SeleniumTableCell |
get(int rowIndex,
int columnIndex)
Gets an individual table cell by its row index and column index in the rows in this table
|
String |
getCaption()
y
Gets the table
<caption> if present. |
List<SeleniumTableCell> |
getColumn(String columnName)
Gets the
List of all cells
under the given column name. |
static SeleniumTable |
getInstance(org.openqa.selenium.WebElement tableElement)
Gets an instance of
SeleniumTable with the base table element provided. |
boolean |
hasCaption()
Gets a flag indicating whether or not the table has a
<caption> element. |
boolean |
hasColumn(String columnName)
Gets a flag indicating whether or not the provided column name
is present in the table.
|
boolean |
hasHeaderRow()
Gets a flag indicating whether or not the table has a
header row.
|
boolean |
hasTBody()
Gets a flag indicating whether or not the table has a
tbody element. |
boolean |
hasTFoot()
Gets a flag indicating whether or not the table has a
tfoot element. |
boolean |
hasTHead()
Gets a flag indicating whether or not the table has a
thead element. |
SeleniumTable |
head()
Gets a table containing the
thead content. |
SeleniumTableRow |
headerRow()
Gets the
SeleniumTableRow that is the header for
this table. |
int |
rowCount()
Gets the total number of rows in this table
|
List<SeleniumTableRow> |
rows()
Gets a list of all rows in the table.
|
forEach, iterator, spliteratorgetElementstatic SeleniumTable getInstance(org.openqa.selenium.WebElement tableElement)
SeleniumTable with the base table element provided.tableElement - the base table elementSeleniumTable.SeleniumTableRow get(int rowIndex)
rowIndex - zero-based row index (top to bottom)SeleniumTableRowImplIndexOutOfBoundsException - if the row index is out of boundsSeleniumTableCell get(int rowIndex, int columnIndex)
rowIndex - zero-based row index (top to bottom)columnIndex - zero-based column index (left to right)SeleniumTableCellImplIndexOutOfBoundsException - if either index is out of boundsList<SeleniumTableCell> getColumn(String columnName)
List of all cells
under the given column name.
A column name corresponds to the text value of a <th>
element somewhere in the table.columnName - the name of the column to get cells forList of SeleniumTableCellUnsupportedOperationException - if there is no header row in the tableIllegalArgumentException - if the provided column name cannot be found in the header rowboolean hasColumn(String columnName)
<th>
element somewhere in the table.columnName - the name of the column<th> element, otherwise falseList<SeleniumTableRow> rows()
tbody rows
which allows us to iterate over the root table object instead of having to
call body()) all the time.List of SeleniumTableRowint rowCount()
SeleniumTable head()
thead content.SeleniumTable for the headSeleniumTable body()
tbody content.SeleniumTable for the bodySeleniumTable foot()
tfoot content.SeleniumTable for the footboolean hasTBody()
tbody element.boolean hasTHead()
thead element.boolean hasTFoot()
tfoot element.SeleniumTableRow headerRow()
SeleniumTableRow that is the header for
this table.SeleniumTableRowboolean hasHeaderRow()
String getCaption()
<caption> if present.boolean hasCaption()
<caption> element.Copyright © 2019. All rights reserved.