Class AbstractTable<T extends Row>

  • All Implemented Interfaces:
    org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement, org.openqa.selenium.WrapsElement
    Direct Known Subclasses:
    DataTable, TreeTable

    public abstract class AbstractTable<T extends Row>
    extends AbstractPageableData
    • Constructor Detail

      • AbstractTable

        public AbstractTable()
    • Method Detail

      • getRow

        public abstract T getRow​(int index)
      • getCell

        public Cell getCell​(int rowIndex,
                            int colIndex)
                     throws IndexOutOfBoundsException
        Gets the Cell at the row/column coordinates.
        Parameters:
        rowIndex - the index of the row
        colIndex - the index of the column in the row
        Returns:
        the Cell representing these coordinates
        Throws:
        IndexOutOfBoundsException - if either row or column not found
      • getHeaderWebElement

        public org.openqa.selenium.WebElement getHeaderWebElement()
      • getHeader

        public Header getHeader()
      • sort

        public void sort​(String headerText)
        Sorts the column found by its header text. It toggles to the next sort direction.
        Parameters:
        headerText - the header text to look for
      • sort

        public void sort​(int index)
        Sorts the column found by its index. It toggles to the next sort direction.
        Parameters:
        index - the index of the column
      • filter

        public void filter​(int cellIndex,
                           String filterValue)
        Filter the column by its index.
        Parameters:
        cellIndex - the index of the column
        filterValue - the value to pass to the filter
      • filter

        public void filter​(String headerText,
                           String filterValue)
        Filter the column by its header text.
        Parameters:
        headerText - the header text to look for
        filterValue - the value to pass to the filter
      • removeFilter

        public void removeFilter​(int cellIndex)
        Removes the current filter at this column index.
        Parameters:
        cellIndex - the index of the column
      • removeFilter

        public void removeFilter​(String headerText)
        Removes the current filter for a column with the header text
        Parameters:
        headerText - the header text to look for
      • toggleSelectAllCheckBox

        public void toggleSelectAllCheckBox()
        If using multiple checkbox mode this toggles the Select All checkbox in the header.
      • getSelectAllCheckBox

        public org.openqa.selenium.WebElement getSelectAllCheckBox()
        Gets the Select All checkbox in the header of the table.
        Returns:
        the WebElement representing the checkbox