Package org.xwiki.test.ui.po
Class TableElement
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.test.ui.po.TableElement
-
public class TableElement extends BaseElement
Represents the actions possible on a static table.- Since:
- 3.2M3
- Version:
- $Id: 453ddb489bee60e552dc3556a44300c97bd940c3 $
-
-
Constructor Summary
Constructors Constructor Description TableElement(org.openqa.selenium.WebElement table)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.openqa.selenium.WebElement>
getColumn(int columnNumber)
List<org.openqa.selenium.WebElement>
getColumn(String firstEntry)
int
getColumnNumber(String firstEntry)
List<org.openqa.selenium.WebElement>
getRow(int rowNumber)
List<org.openqa.selenium.WebElement>
getRow(String firstEntry)
int
getRowNumber(String firstEntry)
boolean
isEmpty()
int
numberOfColumns()
int
numberOfRows()
-
Methods inherited from class org.xwiki.test.ui.po.BaseElement
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady
-
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
- Returns:
- true if there are no colums or no rows in the table. True if the table only contains headings.
-
numberOfColumns
public int numberOfColumns()
- Returns:
- the number of columns in the table.
-
numberOfRows
public int numberOfRows()
- Returns:
- The number of rows in the table.
-
getColumn
public List<org.openqa.selenium.WebElement> getColumn(String firstEntry)
- Parameters:
firstEntry
- text content of the element in the first row (usually a heading).- Returns:
- each WebElement in that column.
-
getColumnNumber
public int getColumnNumber(String firstEntry)
- Parameters:
firstEntry
- text content of the element in the first row (usually a heading).- Returns:
- number of that column (0 indexed)
-
getColumn
public List<org.openqa.selenium.WebElement> getColumn(int columnNumber)
- Parameters:
columnNumber
- zero indexed number of the column.- Returns:
- each WebElement in that column.
-
getRow
public List<org.openqa.selenium.WebElement> getRow(String firstEntry)
- Parameters:
firstEntry
- text content of the element in the first column (a heading if the table has left side headings).- Returns:
- each WebElement in that row.
-
getRowNumber
public int getRowNumber(String firstEntry)
- Parameters:
firstEntry
- text content of the element in the first column (a heading if the table has left side headings).- Returns:
- numeric index of that row or -1 if not found.
-
getRow
public List<org.openqa.selenium.WebElement> getRow(int rowNumber)
- Parameters:
rowNumber
- zero indexed number of the row.- Returns:
- each WebElement in that row.
-
-