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.TestBenchElement
This class represents one cell within the currently active sheet of a
Spreadsheet.
- Author:
- Vaadin Ltd.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Gets the current value of this cell as a string.booleanDetermines if the cell has comment indicatorbooleanDetermines if the cell has invalid formula indicatorbooleanDetermines if this cell has a PopupButton set.booleanFinds out if this cell is selected.booleanDetermines if this cell is normal in the sense that it uses the default in-line editor for editing the cell value.voidClick the PopupButton in the cell.voidSets 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, getDomAttribute, getDomProperty, 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, wrapElementsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.testbench.HasElementQuery
$, $Methods inherited from interface org.openqa.selenium.WebElement
getAccessibleName, getAriaRole
-
Constructor Details
-
SheetCellElement
public SheetCellElement()
-
-
Method Details
-
setValue
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
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
-