Class DataGridValidatorSI

java.lang.Object
org.uitnet.testing.smartfwk.ui.standard.imgobj.datagrid.DataGridValidatorSI

public class DataGridValidatorSI
extends Object
Author:
Madhav Krishna
  • Field Details

    • logger

      protected org.slf4j.Logger logger
    • browser

      protected WebBrowser browser
    • dataGrid

      protected DataGridSI dataGrid
    • region

      protected org.sikuli.script.Region region
  • Constructor Details

    • DataGridValidatorSI

      public DataGridValidatorSI​(WebBrowser browser, DataGridSI locator, org.sikuli.script.Region region)
  • Method Details

    • getUIObject

      public DataGridSI getUIObject()
    • initializeDataGridHeader

      protected void initializeDataGridHeader​(int numRetries)
    • initializeDataGrid

      public void initializeDataGrid​(int numRetries)
      It initializes the datagrid location on the screen. It also initializes the data grid record area.
      Parameters:
      numRetries -
    • isHScrollingRequired

      protected boolean isHScrollingRequired()
    • isRecordPresent

      public RowLocation isRecordPresent​(ItemList<SearchCell> primaryKey, VerticalScrollbar vScrollbar, org.sikuli.script.Region vScrollbarRegion, int numHops, int numHopIters)
      This method searches the record from top to bottom.
      Parameters:
      primaryKey - record to be searched in data grid using vertical scrolling.
      vScrollbar - vertical scrollbar used to navigate the records in the data grid.
      vScrollbarRegion - region where the scrollbar present
      numHops - how many hops/clicks it should perform per numHopIters to start search for a primary key.
      numHopIters - number of hops iteration.
      Returns:
      row location where the primary key present. if null then primary key is not found.
    • isRecordPresent

      public RowLocation isRecordPresent​(ItemList<SearchCell> primaryKey)
      Parameters:
      primaryKey - record to search.
      Returns:
      null only if record does not exist.
    • extractRecordsForVisibleColumns

      public List<List<String>> extractRecordsForVisibleColumns​(int numRecords, ItemList<HeaderColumnSI> headerColumns, VerticalScrollbar vScrollbar, org.sikuli.script.Region vScrollbarRegion, int numHops, int numHopIters)
      It extracts the records from the datagrid only for the visible columns. Scrollbar is used to scroll through all the records in the datagrid. It will only return the unique records for the columns specified.
      Parameters:
      numRecords -
      headerColumns -
      vScrollbar -
      vScrollbarRegion -
      numHops -
      numHopIters -
      Returns:
    • extractVisibleRecordsForVisibleColumns

      public List<List<String>> extractVisibleRecordsForVisibleColumns​(ItemList<HeaderColumnSI> headerColumns)
      It extracts the visible records data only for the visible header columns on the screen.
      Parameters:
      headerColumns -
      Returns:
    • validateRecordPresent

      public void validateRecordPresent​(ItemList<SearchCell> primaryKey)
      Parameters:
      primaryKey - it contains columnName and TextValue to match
    • getCellRegion

      public org.sikuli.script.Region getCellRegion​(HeaderColumnSI headerColumn, RowLocation rowLocation, HorizontalScrollbar hScrollbar, int scrollStepsToLookup)
      Cell is identified by header column location in row location. It returns the region of the cell. That can be further used to recognize UI objects inside this region.
      Parameters:
      headerColumn -
      rowLocation -
      hScrollbar -
      scrollStepsToLookup - it is the number of clicks to perform to search for the record.
      Returns:
      the cell region
    • validateCellValuePresent

      public void validateCellValuePresent​(SearchCell cellValue, RowLocation rowLocation, HorizontalScrollbar hScrollbar, int scrollStepsToLookup)
    • findRowMarkerY1

      protected Set<Integer> findRowMarkerY1()
    • isPresent

      public boolean isPresent​(int numRetries)