Class LiveTableElement

  • Direct Known Subclasses:
    PagesLiveTableElement

    public class LiveTableElement
    extends BaseElement
    Represents the actions possible on a livetable.
    Since:
    3.2M3
    Version:
    $Id: 57239c4965564c25113845ca8914d7a74612362b $
    • Constructor Detail

      • LiveTableElement

        public LiveTableElement​(String livetableId)
    • Method Detail

      • isReady

        public boolean isReady()
        Returns:
        if the livetable has finished displaying and is ready for service
      • waitUntilReady

        public void waitUntilReady()
        Wait till the livetable has finished displaying all its rows (so that we can then assert the livetable content without running the risk that the rows have not been updated yet).
      • hasColumn

        public boolean hasColumn​(String columnTitle)
      • filterColumn

        public void filterColumn​(String inputId,
                                 String filterValue)
      • getFilterValue

        public String getFilterValue​(String inputId)
        Parameters:
        inputId - the filter input identifier
        Returns:
        the value of the filter input for the specified column
        See Also:
        filterColumn(String, String)
      • getColumnIndex

        public int getColumnIndex​(String columnTitle)
        Parameters:
        columnTitle - the title of live table column
        Returns:
        the 0-based index of the specified column
      • hasRow

        public boolean hasRow​(String columnTitle,
                              String columnValue)
        Checks if there is a row that has the given value for the specified column.
        Parameters:
        columnTitle - the title of live table column
        columnValue - the value to match rows against
        Returns:
        true if there is a row that matches the given value for the specified column, false otherwise
      • hasExactRows

        public boolean hasExactRows​(String columnTitle,
                                    List<String> columnValues)
        Checks if there are as many rows as there are passed values and check that the values match.
        Since:
        7.2M2
      • getRowCount

        public int getRowCount()
        Returns:
        the number of rows in the live table
      • getRow

        public org.openqa.selenium.WebElement getRow​(int rowNumber)
        Since:
        5.3RC1
      • getRowNumberForElement

        public int getRowNumberForElement​(org.openqa.selenium.By by)
        Get the row index of an element, relative to the number of currently displayed rows.
        Parameters:
        by - the selector of the searched element
        Returns:
        the row index where the element was found
        Since:
        14.4.2, 14.5
      • getCell

        public org.openqa.selenium.WebElement getCell​(org.openqa.selenium.WebElement rowElement,
                                                      int columnNumber)
        Since:
        5.3RC1
      • getCell

        public org.openqa.selenium.WebElement getCell​(int rowNumber,
                                                      int columnNumber)
        Since:
        11.6RC1, 11.5
      • clickCell

        public ViewPage clickCell​(int rowNumber,
                                  int columnNumber)
        Since:
        5.3RC1
      • waitUntilRowCountGreaterThan

        public void waitUntilRowCountGreaterThan​(int minimalExpectedRowCount)
        Since:
        3.2M3
      • waitUntilRowCountGreaterThan

        public void waitUntilRowCountGreaterThan​(int minimalExpectedRowCount,
                                                 int timeout)
        Same as waitUntilRowCountGreaterThan(int, int) but with a specific timeout (ie not using the default timeout)
        Since:
        9.1RC1
      • sortBy

        public void sortBy​(String columnTitle)
        Sorts the live table on the specified column.
        Parameters:
        columnTitle - the column to sort on
        Since:
        9.7RC1
      • sortAscending

        public void sortAscending​(String columnTitle)
        Sorts the live table on the specified column, by ascending order.
        Parameters:
        columnTitle - the column to sort on
        Since:
        13.3RC1, 12.10.6
      • sortDescending

        public void sortDescending​(String columnTitle)
        Sorts the live table on the specified column, by ascending order.
        Parameters:
        columnTitle - the column to sort on
        Since:
        13.3RC1, 12.10.6
      • clickAction

        public void clickAction​(String actionName,
                                int rowNumber)
        Clicks a form element (usually a button) with the passed name at the passed row number.
        Parameters:
        actionName - the HTML form element name attribute value
        rowNumber - the LT row number (starts at 1)
        Since:
        12.10