Class GridElement.GridEditorElement

  • 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
    Enclosing class:
    GridElement

    public static class GridElement.GridEditorElement
    extends com.vaadin.testbench.elementsbase.AbstractElement
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cancel()
      Cancels this editor.
      String getErrorMessage()
      Gets the error message text, or null if no message is present.
      com.vaadin.testbench.TestBenchElement getField​(int colIndex)
      Gets the editor field for column in given index.
      boolean isEditable​(int colIndex)
      Gets whether the column with the given index is editable, that is, has an associated editor field.
      boolean isFieldErrorMarked​(int colIndex)
      Checks whether a field is marked with an error.
      void save()
      Saves the fields of this editor.
      • 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, isReadOnly, isSelected, scroll, scrollIntoView, scrollLeft, sendKeys, showTooltip, submit, waitForVaadin, waitUntil, waitUntil, wrap, wrapElement, wrapElements
      • Methods inherited from class com.vaadin.testbench.AbstractHasTestBenchCommandExecutor

        $, $$, isElementPresent, isElementPresent
      • Methods inherited from interface org.openqa.selenium.WebElement

        getDomProperty
    • Constructor Detail

      • GridEditorElement

        public GridEditorElement()
    • Method Detail

      • getField

        public com.vaadin.testbench.TestBenchElement getField​(int colIndex)
        Gets the editor field for column in given index.
        Parameters:
        colIndex - the column index
        Returns:
        the editor field for given location
        Throws:
        org.openqa.selenium.NoSuchElementException - if isEditable(colIndex) == false
      • isEditable

        public boolean isEditable​(int colIndex)
        Gets whether the column with the given index is editable, that is, has an associated editor field.
        Parameters:
        colIndex - the column index
        Returns:
        true if the column has an editor field, false otherwise
      • isFieldErrorMarked

        public boolean isFieldErrorMarked​(int colIndex)
        Checks whether a field is marked with an error.
        Parameters:
        colIndex - column index
        Returns:
        true if the field is marked with an error
      • save

        public void save()
        Saves the fields of this editor.

        Note: that this closes the editor making this element useless.

      • cancel

        public void cancel()
        Cancels this editor.

        Note: that this closes the editor making this element useless.

      • getErrorMessage

        public String getErrorMessage()
        Gets the error message text, or null if no message is present.