Class AbstractTable<T extends Row>
- java.lang.Object
-
- org.primefaces.selenium.AbstractPrimePageFragment
-
- org.primefaces.selenium.component.base.AbstractComponent
-
- org.primefaces.selenium.component.base.AbstractPageableData
-
- org.primefaces.selenium.component.base.AbstractTable<T>
-
- All Implemented Interfaces:
org.openqa.selenium.SearchContext,org.openqa.selenium.TakesScreenshot,org.openqa.selenium.WebElement,org.openqa.selenium.WrapsElement
public abstract class AbstractTable<T extends Row> extends AbstractPageableData
-
-
Constructor Summary
Constructors Constructor Description AbstractTable()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidfilter(int cellIndex, String filterValue)Filter the column by its index.voidfilter(String headerText, String filterValue)Filter the column by its header text.CellgetCell(int rowIndex, int colIndex)Gets the Cell at the row/column coordinates.HeadergetHeader()org.openqa.selenium.WebElementgetHeaderWebElement()abstract TgetRow(int index)List<org.openqa.selenium.WebElement>getRowsWebElement()org.openqa.selenium.WebElementgetSelectAllCheckBox()Gets the Select All checkbox in the header of the table.voidremoveFilter(int cellIndex)Removes the current filter at this column index.voidremoveFilter(String headerText)Removes the current filter for a column with the header textvoidsort(int index)Sorts the column found by its index.voidsort(String headerText)Sorts the column found by its header text.voidtoggleSelectAllCheckBox()If using multiple checkbox mode this toggles the Select All checkbox in the header.-
Methods inherited from class org.primefaces.selenium.component.base.AbstractPageableData
getPaginator, getPaginatorWebElement, selectPage, selectPage, selectRowsPerPage
-
Methods inherited from class org.primefaces.selenium.component.base.AbstractComponent
destroy, getWidgetByIdScript, getWidgetConfiguration, getWidgetConfigurationAsString, isAjaxified, isAjaxified
-
Methods inherited from class org.primefaces.selenium.AbstractPrimePageFragment
getElementLocator, getId, getRoot, getWebDriver, getWrappedElement, setElementLocator, setWebDriver
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openqa.selenium.WebElement
clear, click, findElement, findElements, getAccessibleName, getAriaRole, getAttribute, getCssValue, getDomAttribute, getDomProperty, getLocation, getRect, getShadowRoot, getSize, getTagName, getText, isDisplayed, isEnabled, isSelected, sendKeys, submit
-
-
-
-
Method Detail
-
getRowsWebElement
public List<org.openqa.selenium.WebElement> getRowsWebElement()
- Specified by:
getRowsWebElementin classAbstractPageableData
-
getRow
public abstract T getRow(int index)
-
getCell
public Cell getCell(int rowIndex, int colIndex) throws IndexOutOfBoundsException
Gets the Cell at the row/column coordinates.- Parameters:
rowIndex- the index of the rowcolIndex- the index of the column in the row- Returns:
- the
Cellrepresenting these coordinates - Throws:
IndexOutOfBoundsException- if either row or column not found
-
getHeaderWebElement
public org.openqa.selenium.WebElement getHeaderWebElement()
-
getHeader
public Header getHeader()
-
sort
public void sort(String headerText)
Sorts the column found by its header text. It toggles to the next sort direction.- Parameters:
headerText- the header text to look for
-
sort
public void sort(int index)
Sorts the column found by its index. It toggles to the next sort direction.- Parameters:
index- the index of the column
-
filter
public void filter(int cellIndex, String filterValue)Filter the column by its index.- Parameters:
cellIndex- the index of the columnfilterValue- the value to pass to the filter
-
filter
public void filter(String headerText, String filterValue)
Filter the column by its header text.- Parameters:
headerText- the header text to look forfilterValue- the value to pass to the filter
-
removeFilter
public void removeFilter(int cellIndex)
Removes the current filter at this column index.- Parameters:
cellIndex- the index of the column
-
removeFilter
public void removeFilter(String headerText)
Removes the current filter for a column with the header text- Parameters:
headerText- the header text to look for
-
toggleSelectAllCheckBox
public void toggleSelectAllCheckBox()
If using multiple checkbox mode this toggles the Select All checkbox in the header.
-
getSelectAllCheckBox
public org.openqa.selenium.WebElement getSelectAllCheckBox()
Gets the Select All checkbox in the header of the table.- Returns:
- the WebElement representing the checkbox
-
-