Class NeoTable

java.lang.Object
com.onenetwork.platform.tools.test.ui.neo.components.NeoComponent
com.onenetwork.platform.tools.test.ui.neo.components.NeoTable

public class NeoTable
extends NeoComponent
An object representation for the Web element Table used in the NEO UI
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.lang.String COMPONENT_NAME  

    Fields inherited from class com.onenetwork.platform.tools.test.ui.neo.components.NeoComponent

    context, driver, element
  • Constructor Summary

    Constructors 
    Constructor Description
    NeoTable​(NeoUIContext context)  
    NeoTable​(NeoUIContext context, org.openqa.selenium.WebElement element)  
  • Method Summary

    Modifier and Type Method Description
    void checkRow​(int index)
    Mostly used in case of actionable reports, this method checks a row assuming the first column contains either a radiobutton or a checkbox
    org.openqa.selenium.WebElement getCell​(int rowNum, int colIndex)
    The method returns the element of the cell at of a particular row falling under the supplied columnIndex
    org.openqa.selenium.WebElement getCell​(int rowNum, java.lang.String header)
    The method returns the element of the cell at of a particular row falling under the supplied Header value
    java.lang.String getCellValue​(int rowNum, java.lang.String header)
    The method returns the String value contained in the cell at of a particular row falling under the supplied Header value
    int getColumnCount()
    Get the header columns count.
    org.openqa.selenium.WebElement getHeaderCell​(java.lang.String columnName)  
    int getRowCount()
    gives the number of rows displayed in the table
    java.util.List<org.openqa.selenium.WebElement> getRows()  
    java.util.Map<java.lang.String,​java.util.List<org.openqa.selenium.WebElement>> getTableContents()
    Fetches all the table contents row-wise, adds it the map Key > Text content of the First Column Value > List of WebElement in each column To be used mostly with the sidebar widgets containing tables like NeoAlertWidget and NeoProblemWidget
    java.util.List<java.lang.String> getTableHeaders()
    Fetches all the header values for all the columns sequentially
    void openCellHeaderContextMenu​(java.lang.String columnName)
    Open the right-click context menu for a cell header
    void selectCellHeaderMenuItem​(java.lang.String itemName)
    Select options from context menu except Advanced Sorting and Columns

    Methods inherited from class com.onenetwork.platform.tools.test.ui.neo.components.NeoComponent

    getEl, getFieldErrorMessage, getTooltipMessage, isDisplayed, setMultipleValues, setValue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • getTableHeaders

      public java.util.List<java.lang.String> getTableHeaders()
      Fetches all the header values for all the columns sequentially
      Returns:
      List
    • getRows

      public java.util.List<org.openqa.selenium.WebElement> getRows()
    • getRowCount

      public int getRowCount()
      gives the number of rows displayed in the table
      Returns:
    • getColumnCount

      public int getColumnCount()
      Get the header columns count. Skips any columns which have the visibility property set as hidden
      Returns:
    • getTableContents

      public java.util.Map<java.lang.String,​java.util.List<org.openqa.selenium.WebElement>> getTableContents()
      Fetches all the table contents row-wise, adds it the map Key > Text content of the First Column Value > List of WebElement in each column To be used mostly with the sidebar widgets containing tables like NeoAlertWidget and NeoProblemWidget
      Returns:
      Map
    • checkRow

      public void checkRow​(int index)
      Mostly used in case of actionable reports, this method checks a row assuming the first column contains either a radiobutton or a checkbox
      Parameters:
      index -
    • getCellValue

      public java.lang.String getCellValue​(int rowNum, java.lang.String header)
      The method returns the String value contained in the cell at of a particular row falling under the supplied Header value
      Parameters:
      rowNum -
      header -
      Returns:
    • getCell

      public org.openqa.selenium.WebElement getCell​(int rowNum, java.lang.String header)
      The method returns the element of the cell at of a particular row falling under the supplied Header value
      Parameters:
      rowNum -
      header -
      Returns:
    • getHeaderCell

      public org.openqa.selenium.WebElement getHeaderCell​(java.lang.String columnName)
    • getCell

      public org.openqa.selenium.WebElement getCell​(int rowNum, int colIndex)
      The method returns the element of the cell at of a particular row falling under the supplied columnIndex
      Parameters:
      rowNum -
      header -
      Returns:
    • openCellHeaderContextMenu

      public void openCellHeaderContextMenu​(java.lang.String columnName)
      Open the right-click context menu for a cell header
      Parameters:
      columnName - cell header label
    • selectCellHeaderMenuItem

      public void selectCellHeaderMenuItem​(java.lang.String itemName)
      Select options from context menu except Advanced Sorting and Columns
      Parameters:
      itemName - menu item name