Class SheetCellElement
- java.lang.Object
-
- com.vaadin.testbench.TestBenchElement
-
- com.vaadin.flow.component.spreadsheet.testbench.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.TestBenchElementThis class represents one cell within the currently active sheet of a Spreadsheet.- Author:
- Vaadin Ltd.
-
-
Constructor Summary
Constructors Constructor Description SheetCellElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetValue()Gets the current value of this cell as a string.booleanhasCommentIndicator()Determines if the cell has comment indicatorbooleanhasInvalidFormulaIndicator()Determines if the cell has invalid formula indicatorbooleanhasPopupButton()Determines if this cell has a PopupButton set.booleanisCellSelected()Finds out if this cell is selected.booleanisNormalCell()Determines if this cell is normal in the sense that it uses the default in-line editor for editing the cell value.voidpopupButtonClick()Click the PopupButton in the cell.voidsetValue(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
-
-
-
-
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
-
-