Class SheetCellElement

  • 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 SheetCellElement
    extends com.vaadin.testbench.TestBenchElement
    This class represents one cell within the currently active sheet of a Spreadsheet.
    Author:
    Vaadin Ltd.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getValue()
      Gets the current value of this cell as a string.
      boolean hasCommentIndicator()
      Determines if the cell has comment indicator
      boolean hasInvalidFormulaIndicator()
      Determines if the cell has invalid formula indicator
      boolean hasPopupButton()
      Determines if this cell has a PopupButton set.
      boolean isCellSelected()
      Finds out if this cell is selected.
      boolean isNormalCell()
      Determines if this cell is normal in the sense that it uses the default in-line editor for editing the cell value.
      void popupButtonClick()
      Click the PopupButton in the cell.
      void setValue​(String newValue)
      Sets the given value to this cell.
      • 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, getChildren, getClassNames, getCommandExecutor, getContext, getCssValue, getDriver, getId, getLocation, getParent, getProperty, getPropertyBoolean, getPropertyDouble, getPropertyElement, getPropertyElements, getPropertyInteger, getPropertyString, getRect, getScreenshotAs, getShadowRoot, getSize, getTagName, getText, getWrappedElement, hasAttribute, hasClassName, hashCode, hover, init, init, isChrome, isDisplayed, isEnabled, isFirefox, isFocused, isReadOnly, isSelected, scroll, scrollIntoView, scrollLeft, sendKeys, setProperty, setProperty, setProperty, setProperty, submit, waitForVaadin, waitUntil, waitUntil, wrap, wrapElement, wrapElements
      • Methods inherited from interface com.vaadin.testbench.HasElementQuery

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

        getAccessibleName, getAriaRole, getDomAttribute, getDomProperty
    • Constructor Detail

      • SheetCellElement

        public SheetCellElement()
    • Method Detail

      • setValue

        public void setValue​(String newValue)
        Sets the given value to this cell. This method does not support setting values to cells containing custom editors. To set values to custom editors, you should directly set the value to the custom editor which is a child of this element. Note: Calling this method will set the current selection to this cell.
        Parameters:
        newValue - Value to set.
      • getValue

        public String getValue()
        Gets the current value of this cell as a string.
        Returns:
        Current value
      • isCellSelected

        public boolean isCellSelected()
        Finds out if this cell is selected.
        Returns:
        True if cell selected, false otherwise.
      • isNormalCell

        public boolean isNormalCell()
        Determines if this cell is normal in the sense that it uses the default in-line editor for editing the cell value.
        Returns:
        true if this cell uses the normal in-line editor, false if this cell has e.g. a custom editor component.
      • hasPopupButton

        public boolean hasPopupButton()
        Determines if this cell has a PopupButton set.
        Returns:
        true if this cell has a pop-up button, false otherwise
      • popupButtonClick

        public void popupButtonClick()
        Click the PopupButton in the cell.
        Throws:
        IllegalArgumentException - if the cell doesn't contain a PopupButton
      • hasInvalidFormulaIndicator

        public boolean hasInvalidFormulaIndicator()
        Determines if the cell has invalid formula indicator
        Returns:
        true if this cell has a invalid formula indicator
      • hasCommentIndicator

        public boolean hasCommentIndicator()
        Determines if the cell has comment indicator
        Returns:
        true if this cell has a comment indicator