Class TableElement


  • public class TableElement
    extends BaseElement
    Represents the actions possible on a static table.
    Since:
    3.2M3
    Version:
    $Id: 453ddb489bee60e552dc3556a44300c97bd940c3 $
    • Constructor Detail

      • TableElement

        public TableElement​(org.openqa.selenium.WebElement table)
    • 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.