Class CrudElement
- java.lang.Object
-
- com.vaadin.testbench.TestBenchElement
-
- com.vaadin.flow.component.crud.testbench.CrudElement
-
- All Implemented Interfaces:
com.vaadin.testbench.commands.CanCompareScreenshots,com.vaadin.testbench.HasCallFunction,com.vaadin.testbench.HasDriver,com.vaadin.testbench.HasElementQuery,com.vaadin.testbench.HasPropertySettersGetters,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 CrudElement extends com.vaadin.testbench.TestBenchElementTestBench element for the vaadin-crud element
-
-
Constructor Summary
Constructors Constructor Description CrudElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfirmDialogElementgetConfirmCancelDialog()Gets the confirm cancel dialogConfirmDialogElementgetConfirmDeleteDialog()Gets the confirm delete dialogcom.vaadin.testbench.TestBenchElementgetEditor()Gets the open editor overlayButtonElementgetEditorCancelButton()Gets the editor cancel buttonButtonElementgetEditorDeleteButton()Gets the editor delete buttonStringgetEditorPosition()Gets the editor position selected for the CRUD Possible values are "" (default), "bottom" and "aside"ButtonElementgetEditorSaveButton()Gets the editor save buttonList<TextFieldElement>getFilterFields()Gets the filter fields if the Crud built-in Grid is being used with filters enabledGridElementgetGrid()Gets the crud gridOptional<com.vaadin.testbench.TestBenchElement>getNewItemButton()Gets the new item buttonList<com.vaadin.testbench.TestBenchElement>getToolbar()Gets the toolbar content.booleanisEditOnClick()Gets whether editor can be opened by a click on the row or notbooleanisEditorOpen()Checks if an editor overlay is open on the default editor position Otherwise, checks the value of editorOpened propertyvoidopenRowForEditing(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, 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, isSelected, scroll, scrollIntoView, scrollLeft, sendKeys, setProperty, setProperty, setProperty, setProperty, submit, waitForVaadin, waitUntil, waitUntil, wrap, wrapElement, wrapElements
-
-
-
-
Method Detail
-
getGrid
public GridElement getGrid()
Gets the crud grid- Returns:
- the crud grid
-
getNewItemButton
public Optional<com.vaadin.testbench.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<com.vaadin.testbench.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 on the default editor position Otherwise, checks the value of editorOpened property- Returns:
trueif the editor is open andfalse, otherwise
-
getEditorPosition
public String getEditorPosition()
Gets the editor position selected for the CRUD Possible values are "" (default), "bottom" and "aside"- Returns:
- a string containing the value defined for the editor position
-
isEditOnClick
public boolean isEditOnClick()
Gets whether editor can be opened by a click on the row or not- Returns:
trueif feature is enabled orfalseotherwise
-
getEditor
public com.vaadin.testbench.TestBenchElement getEditor()
Gets the open editor overlay- Returns:
- the open editor overlay
-
getConfirmCancelDialog
public ConfirmDialogElement getConfirmCancelDialog()
Gets the confirm cancel dialog- Returns:
- the confirm cancel dialog
-
getConfirmDeleteDialog
public ConfirmDialogElement getConfirmDeleteDialog()
Gets the confirm delete dialog- Returns:
- the confirm delete dialog
-
-