Class AgGridHighLevelOperations


  • public final class AgGridHighLevelOperations
    extends Object
    High level utilities for definitions of simplified grids and operations
    • Field Detail

      • retry_duration_in_millisec

        public static int retry_duration_in_millisec
    • Constructor Detail

      • AgGridHighLevelOperations

        public AgGridHighLevelOperations​(Path gridContainer)
    • Method Detail

      • buildMinimalGridFromHeader

        public AgGrid buildMinimalGridFromHeader​(List<String> headers)
      • ensureCellValueIsPresent

        public void ensureCellValueIsPresent​(int rowNumber,
                                             String columnTitle,
                                             String expectedValue)
        Ensure(or assert) that the cell in specific row and column has the expected value
        Parameters:
        rowNumber - - number of row of the cell
        columnTitle - - the column of the cell
        expectedValue - - the value we assert in that cell
      • hoverOverCell

        public Path hoverOverCell​(int rowNumber,
                                  String columnTitle)
        Hover over speicic cell, after ensuring it is visible
        Parameters:
        rowNumber - - row number
        columnTitle - - column
        Returns:
        the cell
      • unorderedGrid

        public AgGrid unorderedGrid​(List<Map<String,​String>> rows)
        define AgGrid with unordered columns
        Parameters:
        rows - a list of the rows, in order
        Returns:
        an AgGrid object
      • unorderedStrictGrid

        public AgGrid unorderedStrictGrid​(List<Map<String,​String>> rows)
        define a "strict" AgGrid with unordered columns. A strict grid means no other rows exist.
        Parameters:
        rows - a list of all the rows in the grid, in order
        Returns:
        an AgGrid object
      • clickOnColumnWithValue

        public Path clickOnColumnWithValue​(String columnName,
                                           String value)
        Find a the first cell in the given column with the given value, ensure it is visible, and click on it.
        Parameters:
        columnName - the column name
        value - the value of the cell we are looking for
        Returns:
        the cell element
      • clickOnTextInsideColumnWithValue

        public Path clickOnTextInsideColumnWithValue​(String columnName,
                                                     String value)
        Find a the first cell in the given column with the given value, ensure it is visible, and click on the text inside it.
        Parameters:
        columnName - the column name
        value - the value of the cell we are looking for
        Returns:
        the cell element
      • cellInGrid

        public Path cellInGrid​(int rowNumber,
                               String columnName)
        Ensure a specific cell is visible and return a Path to it
        Parameters:
        rowNumber - row number
        columnName - column name
        Returns:
        the request cell
      • getMinimalGrid

        public AgGrid getMinimalGrid​(String columnName)
        create a minimal grid definition that has the column we are interersted in
        Parameters:
        columnName - the column name
        Returns:
        a grid object
      • goToEditModeInCell

        public Path goToEditModeInCell​(String columnName,
                                       int rowNumber)
        Find a cell, and doubleclick it
        Parameters:
        columnName - column name
        rowNumber - row number
        Returns:
        the cell
      • goToEditModeInCell

        public Path goToEditModeInCell​(String columnName,
                                       String value)
        Find a cell, and doubleclick it
        Parameters:
        columnName - column name
        value - value of cell
        Returns:
        the cell
      • selectInCell

        public void selectInCell​(String columnName,
                                 int rowNumber,
                                 String option)
        select an option from a dropdown in a cell
        Parameters:
        columnName - column name
        rowNumber - row number
        option - option to choose
      • getRowOfDisplayedCell

        public Path getRowOfDisplayedCell​(Path cell)
        return a path to the Row of a cell, assuming the cell is displayed. This should be used whenever you want to perform an operation on the row or search inside the row.
        Parameters:
        cell - the cell we have
        Returns:
        the Path of the row
      • changeSimpleInputValueByValue

        public void changeSimpleInputValueByValue​(String columnName,
                                                  String oldValue,
                                                  String newValue)
        select an option from a dropdown in a cell
        Parameters:
        columnName - column name
        oldValue - row number
        newValue - new Value
      • getRowWithColumnAndValue

        public Path getRowWithColumnAndValue​(String column,
                                             String value)
      • getCellInRowWithColumnAndValue

        public Path getCellInRowWithColumnAndValue​(String wantedColumn,
                                                   String column,
                                                   String value)
        First find a row that has the given value in the column, then find the column "wantedColumn" in the same row, ensure it is visible, and return the Path to it.
        Parameters:
        wantedColumn - the column of the cell we want
        column - the column of the cell that is used to find the row
        value - the value of the column that is used to find the row
        Returns:
        The path of the wanted cell
      • getCellInRowWithColumnAndValueById

        public Path getCellInRowWithColumnAndValueById​(String wantedColumnId,
                                                       String column,
                                                       String value)
        First find a row that has the given value in the column, then find the column with the ID wantedColumnId in the same row, ensure it is visible, and return the Path to it.
        Parameters:
        wantedColumnId - the column of the cell we want
        column - the column of the cell that is used to find the row
        value - the value of the column that is used to find the row
        Returns:
        The path of the wanted cell