public class GridElement extends TestBenchElement
<vaadin-grid>
element.Constructor and Description |
---|
GridElement() |
Modifier and Type | Method and Description |
---|---|
void |
deselect(int rowIndex)
Deselects the row with the given index.
|
protected void |
generatedColumnIdsIfNeeded() |
List<GridColumnElement> |
getAllColumns()
Gets all columns defined for the grid, including any selection checkbox
column.
|
GridTHTDElement |
getCell(int rowIndex,
GridColumnElement column)
Gets the grid cell for the given row and column.
|
GridTHTDElement |
getCell(int rowIndex,
int colIndex)
Gets the grid cell for the given row and column index.
|
GridTHTDElement |
getCell(String contents)
Finds the first cell inside the rendered range with a text content
matching the given string.
|
GridColumnElement |
getColumn(String headerText)
Gets the column with the given header text.
|
int |
getFirstVisibleRowIndex()
Gets the index of the first row which is at least partially visible.
|
TestBenchElement |
getFooterCell(int columnIndex)
Gets the footer cell for the given visible column index.
|
GridTHTDElement |
getHeaderCell(int columnIndex)
Gets the header cell for the given visible column index.
|
int |
getPageSize()
Gets the page size used when fetching data.
|
GridTRElement |
getRow(int rowIndex)
Gets the
tr element for the given row index. |
int |
getRowCount()
Gets the total number of rows.
|
List<GridColumnElement> |
getVisibleColumns()
Gets the currently visible columns in the grid, including any selection
checkbox column.
|
void |
scrollToRow(int row)
Scrolls to the row with the given index.
|
void |
select(int rowIndex)
Selects the row with the given index.
|
callFunction, clear, click, click, compareScreen, compareScreen, compareScreen, contextClick, dispatchEvent, doubleClick, equals, executeScript, findElement, findElements, focus, getAttribute, getCapabilities, getClassNames, getCommandExecutor, getContext, getCssValue, getDriver, getLocation, getProperty, getPropertyBoolean, getPropertyDouble, getPropertyElement, getPropertyElements, getPropertyInteger, getPropertyString, getRect, getScreenshotAs, getSize, getTagName, getText, getWrappedElement, hasAttribute, hasClassName, hashCode, init, init, isChrome, isDisplayed, isEnabled, isFirefox, isIE, isSelected, scroll, scrollIntoView, scrollLeft, sendKeys, setProperty, setProperty, setProperty, setProperty, submit, waitForVaadin, waitUntil, waitUntil, wrap, wrapElement, wrapElements
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
$, $
public void scrollToRow(int row)
row
- the row to scroll topublic int getPageSize()
public int getFirstVisibleRowIndex()
public int getRowCount()
public GridTHTDElement getCell(int rowIndex, int colIndex)
For the column index, only visible columns are taken into account.
Automatically scrolls the given row into view
rowIndex
- the row indexcolIndex
- the column indexpublic GridTHTDElement getCell(int rowIndex, GridColumnElement column)
Automatically scrolls the given row into view
rowIndex
- the row indexcolumn
- the column element for the columnpublic GridTHTDElement getCell(String contents) throws org.openqa.selenium.NoSuchElementException
contents
- the string to look fororg.openqa.selenium.NoSuchElementException
- if no cell with the given string was foundpublic GridTRElement getRow(int rowIndex)
tr
element for the given row index.rowIndex
- the row indexpublic List<GridColumnElement> getAllColumns()
protected void generatedColumnIdsIfNeeded()
public List<GridColumnElement> getVisibleColumns()
public GridColumnElement getColumn(String headerText) throws org.openqa.selenium.NoSuchElementException
If multiple columns are found with the same header text, returns the first column.
headerText
- the text in the headerorg.openqa.selenium.NoSuchElementException
- if no column was foundpublic GridTHTDElement getHeaderCell(int columnIndex)
columnIndex
- the index of the columnpublic TestBenchElement getFooterCell(int columnIndex)
columnIndex
- the index of the columnpublic void select(int rowIndex)
rowIndex
- the row to selectpublic void deselect(int rowIndex)
rowIndex
- the row to deselectCopyright © 2019. All rights reserved.