Package com.vaadin.testbench.elements
Class TreeGridElement
- java.lang.Object
-
- com.vaadin.testbench.AbstractHasTestBenchCommandExecutor
-
- com.vaadin.testbench.TestBenchElement
-
- com.vaadin.testbench.elementsbase.AbstractElement
-
- com.vaadin.testbench.elements.AbstractComponentElement
-
- com.vaadin.testbench.elements.GridElement
-
- com.vaadin.testbench.elements.TreeGridElement
-
- All Implemented Interfaces:
com.vaadin.testbench.commands.CanCompareScreenshots,com.vaadin.testbench.commands.CanWaitForVaadin,com.vaadin.testbench.commands.TestBenchElementCommands,com.vaadin.testbench.HasDriver,com.vaadin.testbench.HasSearchContext,com.vaadin.testbench.HasTestBenchCommandExecutor,org.openqa.selenium.SearchContext,org.openqa.selenium.TakesScreenshot,org.openqa.selenium.WebElement,org.openqa.selenium.WrapsElement
public class TreeGridElement extends GridElement
TestBench Element API for TreeGrid.- Author:
- Vaadin Ltd
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vaadin.testbench.elements.GridElement
GridElement.GridCellElement, GridElement.GridEditorElement, GridElement.GridRowElement
-
Nested classes/interfaces inherited from class com.vaadin.testbench.elements.AbstractComponentElement
AbstractComponentElement.ReadOnlyException
-
-
Constructor Summary
Constructors Constructor Description TreeGridElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollapseWithClick(int rowIndex)Collapses the row at the given index in the grid.voidcollapseWithClick(int rowIndex, int hierarchyColumnIndex)Collapses the row at the given index in the grid with the given hierarchical column index.voidexpandWithClick(int rowIndex)Expands the row at the given index in the grid.voidexpandWithClick(int rowIndex, int hierarchyColumnIndex)Expands the row at the given index in the grid with the given hierarchical column index.org.openqa.selenium.WebElementgetExpandElement(int rowIndex, int hierarchyColumnIndex)Gets the expand/collapse element for the given row.booleanhasExpandToggle(int rowIndex, int hierarchyColumnIndex)Check whether the given indices correspond to a cell that contains a visible hierarchy toggle element.booleanisRowCollapsed(int rowIndex, int hierarchyColumnIndex)Returns whether the row at the given index is collapsed or not.booleanisRowExpanded(int rowIndex, int hierarchyColumnIndex)Returns whether the row at the given index is expanded or not.-
Methods inherited from class com.vaadin.testbench.elements.GridElement
getBody, getCell, getDetails, getEditor, getFooter, getFooterCell, getFooterCells, getFooterCount, getFooterRow, getHeader, getHeaderCell, getHeaderCellByCaption, getHeaderCellByCaption, getHeaderCells, getHeaderCount, getHeaderRow, getHorizontalScroller, getRow, getRowCount, getRows, getTableWrapper, getVerticalScroller, scrollToRow, toggleColumnHidden
-
Methods inherited from class com.vaadin.testbench.elements.AbstractComponentElement
getCaption, getHTML, getStyleAttribute, isReadOnly
-
Methods inherited from class com.vaadin.testbench.TestBenchElement
clear, click, click, clickHiddenElement, compareScreen, compareScreen, compareScreen, contextClick, doubleClick, equals, findElement, findElements, focus, getAccessibleName, getAriaRole, getAttribute, getCapabilities, getClassNames, getCommandExecutor, getContext, getCssValue, getDomAttribute, getDriver, getId, getLocation, getRect, getScreenshotAs, getShadowRoot, getSize, getTagName, getText, getWrappedElement, hasAttribute, hasClassName, hashCode, init, init, isChrome, isDisplayed, isEnabled, isFirefox, isFocused, isSelected, scroll, scrollIntoView, scrollLeft, sendKeys, showTooltip, submit, waitForVaadin, waitUntil, waitUntil, wrap, wrapElement, wrapElements
-
Methods inherited from class com.vaadin.testbench.AbstractHasTestBenchCommandExecutor
$, $$, isElementPresent, isElementPresent
-
-
-
-
Method Detail
-
expandWithClick
public void expandWithClick(int rowIndex)
Expands the row at the given index in the grid. This expects the first column to have the hierarchy data.- Parameters:
rowIndex- 0-based row index to expand- See Also:
expandWithClick(int, int)
-
expandWithClick
public void expandWithClick(int rowIndex, int hierarchyColumnIndex)Expands the row at the given index in the grid with the given hierarchical column index.- Parameters:
rowIndex- 0-based row index to expandhierarchyColumnIndex- 0-based index of the hierarchy column
-
collapseWithClick
public void collapseWithClick(int rowIndex)
Collapses the row at the given index in the grid. This expects the first column to have the hierarchy data.- Parameters:
rowIndex- 0-based row index to collapse- See Also:
collapseWithClick(int, int)
-
collapseWithClick
public void collapseWithClick(int rowIndex, int hierarchyColumnIndex)Collapses the row at the given index in the grid with the given hierarchical column index.- Parameters:
rowIndex- 0-based row index to collapsehierarchyColumnIndex- 0-based index of the hierarchy column
-
isRowExpanded
public boolean isRowExpanded(int rowIndex, int hierarchyColumnIndex)Returns whether the row at the given index is expanded or not.- Parameters:
rowIndex- 0-based row indexhierarchyColumnIndex- 0-based index of the hierarchy column- Returns:
trueif expanded,falseif collapsed
-
isRowCollapsed
public boolean isRowCollapsed(int rowIndex, int hierarchyColumnIndex)Returns whether the row at the given index is collapsed or not.- Parameters:
rowIndex- 0-based row indexhierarchyColumnIndex- 0-based index of the hierarchy column- Returns:
trueif collapsed,falseif expanded
-
hasExpandToggle
public boolean hasExpandToggle(int rowIndex, int hierarchyColumnIndex)Check whether the given indices correspond to a cell that contains a visible hierarchy toggle element.- Parameters:
rowIndex- 0-based row indexhierarchyColumnIndex- 0-based index of the hierarchy column- Returns:
trueif this cell has the expand toggle visible
-
getExpandElement
public org.openqa.selenium.WebElement getExpandElement(int rowIndex, int hierarchyColumnIndex)Gets the expand/collapse element for the given row.- Parameters:
rowIndex- 0-based row indexhierarchyColumnIndex- 0-based index of the hierarchy column- Returns:
- the
spanelement that is clicked for expanding/collapsing a rows - Throws:
org.openqa.selenium.NoSuchElementException- if there is no expand element for this row
-
-