com.vaadin.flow.component.crud.testbench.
Class CrudElement
- java.lang.Object
-
- com.vaadin.testbench.TestBenchElement
-
- com.vaadin.flow.component.crud.testbench.CrudElement
-
All Implemented Interfaces:
CanCompareScreenshots, HasCallFunction, HasDriver, HasElementQuery, HasPropertySettersGetters, HasSearchContext, HasTestBenchCommandExecutor, org.openqa.selenium.internal.WrapsElement, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement
public class CrudElement extends TestBenchElement
TestBench element for the vaadin-crud element
-
-
Constructor Summary
Constructors Constructor and Description CrudElement()
-
Method Summary
All Methods Modifier and Type Method and Description TestBenchElement
getEditor()
Gets the open editor overlay
ButtonElement
getEditorCancelButton()
Gets the editor cancel button
ButtonElement
getEditorDeleteButton()
Gets the editor delete button
ButtonElement
getEditorSaveButton()
Gets the editor save button
List<TextFieldElement>
getFilterFields()
Gets the filter fields if the Crud built-in Grid is being used with filters enabled
GridElement
getGrid()
Gets the crud grid
Optional<TestBenchElement>
getNewItemButton()
Gets the new item button
List<TestBenchElement>
getToolbar()
Gets the toolbar content.
boolean
isEditorOpen()
Checks if an editor overlay is open
void
openRowForEditing(int row)
Opens a grid row for editing using the CRUD edit button on that row
-
Methods inherited from class com.vaadin.testbench.TestBenchElement
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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.testbench.HasElementQuery
$, $
-
-
-
-
Method Detail
-
getGrid
public GridElement getGrid()
Gets the crud grid
Returns:
the crud grid
-
getNewItemButton
public Optional<TestBenchElement> getNewItemButton()
Gets the new item button
Returns:
the new item button
-
getFilterFields
public List<TextFieldElement> getFilterFields()
Gets the filter fields if the Crud built-in Grid is being used with filters enabled
Returns:
the filter field for each column
-
getToolbar
public List<TestBenchElement> getToolbar()
Gets the toolbar content.
Returns:
the toolbar content
-
openRowForEditing
public void openRowForEditing(int row)
Opens a grid row for editing using the CRUD edit button on that row
Parameters:
row
- the row to open for editing
-
getEditorSaveButton
public ButtonElement getEditorSaveButton()
Gets the editor save button
Returns:
the editor save button
-
getEditorCancelButton
public ButtonElement getEditorCancelButton()
Gets the editor cancel button
Returns:
the editor cancel button
-
getEditorDeleteButton
public ButtonElement getEditorDeleteButton()
Gets the editor delete button
Returns:
the editor delete button
-
isEditorOpen
public boolean isEditorOpen()
Checks if an editor overlay is open
Returns:
true if the editor overlay is open and false if otherwise
-
getEditor
public TestBenchElement getEditor()
Gets the open editor overlay
Returns:
the open editor overlay
-
-