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 checkboxorg.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 columnIndexorg.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 valuejava.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 valueint
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 tablejava.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 ofWebElement
in each column To be used mostly with the sidebar widgets containing tables likeNeoAlertWidget
andNeoProblemWidget
java.util.List<java.lang.String>
getTableHeaders()
Fetches all the header values for all the columns sequentiallyvoid
openCellHeaderContextMenu(java.lang.String columnName)
Open the right-click context menu for a cell headervoid
selectCellHeaderMenuItem(java.lang.String itemName)
Select options from context menu except Advanced Sorting and ColumnsMethods inherited from class com.onenetwork.platform.tools.test.ui.neo.components.NeoComponent
getEl, getFieldErrorMessage, getTooltipMessage, isDisplayed, setMultipleValues, setValue
-
Field Details
-
COMPONENT_NAME
public static final java.lang.String COMPONENT_NAME- See Also:
- Constant Field Values
-
-
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 ofWebElement
in each column To be used mostly with the sidebar widgets containing tables likeNeoAlertWidget
andNeoProblemWidget
- 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 theelement 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 theelement 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
-