com.hp.lft.sdk.web

Interface GridBase<T extends TableRowBase>

Note: Supported from LeanFT 14.51.
    • Method Detail

      • getColumnHeaders

        List<String> getColumnHeaders()
                          throws GeneralLeanFtException
        Returns the headers of the columns, usually this is the text of the first row.
        Returns:
        the headers of the columns, usually this is the text of the first row.
        Throws:
        GeneralLeanFtException - if error occurs during execution
      • selectCell

        void selectCell(int row,
                      int column)
                        throws GeneralLeanFtException
        Selects the specified cell in the grid.
        Parameters:
        row - 0-based row index
        column - 0-based column index
        Throws:
        GeneralLeanFtException - if error occurs during execution
      • selectCell

        void selectCell(int row,
                      String columnHeader)
                        throws GeneralLeanFtException
        Selects the specified cell in the grid.
        Parameters:
        row - 0-based row index
        columnHeader - the column caption
        Throws:
        GeneralLeanFtException - if error occurs during execution
      • findRowWithCellTextInColumn

        T findRowWithCellTextInColumn(String text,
                                    int columnNumber)
                                                           throws GeneralLeanFtException
        Finds the first row with the specified text in the specified column.
        Parameters:
        text - the text to find.
        columnNumber - the column number to search.
        Returns:
        the requested row or null if non exists.
        Throws:
        GeneralLeanFtException - if error occurs during execution
      • findRowWithCellTextInColumn

        T findRowWithCellTextInColumn(String text,
                                    String columnHeader)
                                                           throws GeneralLeanFtException
        Finds the first row with the specified text in the specified column.
        Parameters:
        text - the text to find.
        columnHeader - the column caption.
        Returns:
        the requested row or null if none exists.
        Throws:
        GeneralLeanFtException - if error occurs during execution
      • findRowWithCellTextInColumn

        T findRowWithCellTextInColumn(String text,
                                    int columnNumber,
                                    int startFromRow)
                                                           throws GeneralLeanFtException
        Finds the first row with the specified text in the specified column, starting from the specified row.
        Parameters:
        text - text to find.
        columnNumber - the column number to search.
        startFromRow - index from which to start the search.
        Returns:
        the requested row, or null if none exists.
        Throws:
        GeneralLeanFtException - if error occurs during execution
      • findRowWithCellTextInColumn

        T findRowWithCellTextInColumn(String text,
                                    String columnHeader,
                                    int startFromRow)
                                                           throws GeneralLeanFtException
        Finds the first row with the specified text in the specified column, starting from the specified row.
        Parameters:
        text - text to find.
        columnHeader - the column caption.
        startFromRow - index from which to start the search.
        Returns:
        the requested row, or null if none exists.
        Throws:
        GeneralLeanFtException - if error occurs during execution
      • findRowWithCellTextInColumn

        T findRowWithCellTextInColumn(TextMatch textMatch,
                                    ColumnToSearch columnToSearch)
                                                           throws GeneralLeanFtException
        Finds the row with the specified text in the specified column, in cases where the text or columnHeader may appear more than once. Scrolls to the found row if one exists.
        Usage example: TableRow row = grid.findRowWithCellTextInColumn(TextMatch.match("Portuguese", 2), ColumnToSearch.byHeader("Language", 1));
        This example finds the 3rd occurrence of the text "Portuguese" in the 2nd column with the header "Language".
        Parameters:
        textMatch - description of the text we are looking for
        columnToSearch - the column number or column header in which to search for the text.
        Returns:
        the requested row if one exists.
        Throws:
        GeneralLeanFtException - if the requested row cannot be found or error occurs during execution