public class Table extends TypifiedElement
| Constructor and Description |
|---|
Table(org.openqa.selenium.WebElement wrappedElement)
Specifies
WebElement representing table tag. |
| Modifier and Type | Method and Description |
|---|---|
org.openqa.selenium.WebElement |
getCellAt(int i,
int j)
Returns table cell element (
<td>), at i-th row and j-th column. |
List<org.openqa.selenium.WebElement> |
getColumnByIndex(int index)
Returns table cell elements (
<td>), of a particular column. |
List<List<org.openqa.selenium.WebElement>> |
getColumns()
Returns table cell elements (
<td>), grouped by columns. |
List<List<String>> |
getColumnsAsString()
Returns text values of table cell elements (
<td>), grouped by columns. |
List<org.openqa.selenium.WebElement> |
getHeadings()
Returns a list of table heading elements (
<th>). |
List<String> |
getHeadingsAsString()
Returns text values of table heading elements (contained in "th" tags).
|
List<List<org.openqa.selenium.WebElement>> |
getRows()
Returns table cell elements (
<td>), grouped by rows. |
List<List<String>> |
getRowsAsString()
Returns text values of table cell elements (
<td>), grouped by rows. |
List<Map<String,String>> |
getRowsAsStringMappedToHeadings()
Same as
getRowsMappedToHeadings() but retrieves text from row elements (<td>). |
List<Map<String,String>> |
getRowsAsStringMappedToHeadings(List<String> headings)
Same as
getRowsMappedToHeadings(java.util.List) but retrieves text from row elements (<td>). |
List<Map<String,org.openqa.selenium.WebElement>> |
getRowsMappedToHeadings()
Returns list of maps where keys are table headings and values are table row elements (
<td>). |
List<Map<String,org.openqa.selenium.WebElement>> |
getRowsMappedToHeadings(List<String> headings)
Returns list of maps where keys are passed headings and values are table row elements (
<td>),. |
clear, click, exists, findElement, findElements, getAttribute, getCssValue, getLocation, getName, getRect, getScreenshotAs, getSize, getTagName, getText, getWrappedElement, isDisplayed, isEnabled, isSelected, sendKeys, setName, submit, toStringpublic Table(org.openqa.selenium.WebElement wrappedElement)
WebElement representing table tag.wrappedElement - WebElement to wrap.public List<org.openqa.selenium.WebElement> getHeadings()
<th>).
Multiple rows of heading elements, (<tr>), are flattened
i.e. the second row, (<tr>), will follow the first, which can be
misleading when the table uses colspan and rowspan.
public List<String> getHeadingsAsString()
public List<List<org.openqa.selenium.WebElement>> getRows()
<td>), grouped by rows.public List<List<String>> getRowsAsString()
<td>), grouped by rows.public List<List<org.openqa.selenium.WebElement>> getColumns()
<td>), grouped by columns.public List<org.openqa.selenium.WebElement> getColumnByIndex(int index)
<td>), of a particular column.index - the 1-based index of the desired columnpublic List<List<String>> getColumnsAsString()
<td>), grouped by columns.public org.openqa.selenium.WebElement getCellAt(int i,
int j)
<td>), at i-th row and j-th column.i - Row numberj - Column numberpublic List<Map<String,org.openqa.selenium.WebElement>> getRowsMappedToHeadings()
<td>).public List<Map<String,org.openqa.selenium.WebElement>> getRowsMappedToHeadings(List<String> headings)
<td>),.headings - List containing strings to be used as table headings.public List<Map<String,String>> getRowsAsStringMappedToHeadings()
getRowsMappedToHeadings() but retrieves text from row elements (<td>).Copyright © 2023 Yandex. All rights reserved.