Interface GridPattern


public interface GridPattern
The methods and properties used to interact with a grid control; a container control that can be traversed by row and column. The children of this element support the GridItemPattern pattern.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    activateCell(int row, int column)
    Activates (double-clicks) the specified cell in the grid.
    Note: In the default UIA Pro Add-in, this method is supported for backward compatibility only.
    void
    addCellToSelection(int row, int column)
    Selects a cell in addition to previously selected cells.
    void
    Selects a row in addition to previously selected rows.
    void
    clickCell(int row, int column)
    Clicks the specified cell in the grid.
    void
    clickCell(int row, int column, MouseButton button)
    Clicks the specified cell in the grid.
    void
    doubleClickCell(int row, int column)
    Double-clicks the specified cell in the grid.
    Note: Supported when using the enhanced Beta UIA Pro Add-in.
    getCell(int row, int column)
    Deprecated.
    getCellAsUIObject(int row, int column)
    Retrieves a UIAPro object representing an item in the grid.
    Note: This method is not supported when you enable the legacy UIA Pro Add-in
    getCellName(int row, int column)
     
    getCellText(int row, int column)
     
    getCellValue(int row, int column)
     
    int
     
    int
     
    void
    selectCell(int row, int column)
    Selects a cell in the grid.
    void
    selectRow(int row)
    Selects a row in the grid.
    void
    setCellValue(int row, int column, String cellValue)
    Sets the specified cell's value using the IValuePattern pattern.
  • Method Details

    • getRowCount

      int getRowCount() throws GeneralLeanFtException
      Returns:
      The number of rows in the grid.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getColumnCount

      int getColumnCount() throws GeneralLeanFtException
      Returns:
      The number of columns in the grid.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • activateCell

      void activateCell(int row, int column) throws GeneralLeanFtException
      Activates (double-clicks) the specified cell in the grid.
      Note: In the default UIA Pro Add-in, this method is supported for backward compatibility only. Use doubleClickCell(int, int) instead.
      Parameters:
      row - The cell row index
      column - The cell column index
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • doubleClickCell

      void doubleClickCell(int row, int column) throws GeneralLeanFtException
      Double-clicks the specified cell in the grid.
      Note: Supported when using the enhanced Beta UIA Pro Add-in. In the legacy UIA Pro Add-in, use activateCell(int, int).
      Parameters:
      row - The cell row index
      column - The cell column index
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • addCellToSelection

      void addCellToSelection(int row, int column) throws GeneralLeanFtException
      Selects a cell in addition to previously selected cells.
      Parameters:
      row - The cell row index
      column - The cell column index
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • addRowToSelection

      void addRowToSelection(int row) throws GeneralLeanFtException
      Selects a row in addition to previously selected rows.
      Parameters:
      row - The row to select.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • clickCell

      void clickCell(int row, int column) throws GeneralLeanFtException
      Clicks the specified cell in the grid.
      Parameters:
      row - The cell row index
      column - The cell column index
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • clickCell

      void clickCell(int row, int column, MouseButton button) throws GeneralLeanFtException
      Clicks the specified cell in the grid.
      Parameters:
      row - The cell row index
      column - The cell column index
      button - The mouse button used to perform the cell click.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getCellAsUIObject

      UiObject getCellAsUIObject(int row, int column) throws GeneralLeanFtException
      Retrieves a UIAPro object representing an item in the grid.
      Note: This method is not supported when you enable the legacy UIA Pro Add-in
      Parameters:
      row - The cell row index
      column - The cell column index
      Returns:
      Retrieves a UIAPro object representing an item in the grid.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getCell

      @Deprecated Object getCell(int row, int column) throws GeneralLeanFtException
      Deprecated.
      Retrieves a UIAPro object representing an item in the grid.
      Note: This method is only supported when you enable the legacy UIA Pro Add-in
      Parameters:
      row - The cell row index
      column - The cell column index
      Returns:
      Retrieves a UIAPro object representing an item in the grid.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getCellName

      String getCellName(int row, int column) throws GeneralLeanFtException
      Parameters:
      row - The cell row index
      column - The cell column index
      Returns:
      the value of the name property for the specified cell.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getCellText

      String getCellText(int row, int column) throws GeneralLeanFtException
      Parameters:
      row - The cell row index
      column - The cell column index
      Returns:
      the text provided by the cell's ITextPattern pattern.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getCellValue

      String getCellValue(int row, int column) throws GeneralLeanFtException
      Parameters:
      row - The cell row index
      column - The cell column index
      Returns:
      the value provided by the cell IValuePattern pattern.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • setCellValue

      void setCellValue(int row, int column, String cellValue) throws GeneralLeanFtException
      Sets the specified cell's value using the IValuePattern pattern.
      Parameters:
      row - The cell row index
      column - The cell column index
      cellValue - The cell value to set
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • selectRow

      void selectRow(int row) throws GeneralLeanFtException
      Selects a row in the grid.
      Parameters:
      row - The row to select
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • selectCell

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