Class TableCellElement
java.lang.Object
com.vaadin.testbench.TestBenchElement
com.vaadin.flow.component.html.testbench.TableCellElement
- All Implemented Interfaces:
CanCompareScreenshots,HasCallFunction,HasDriver,HasElementQuery,HasPropertySettersGetters,HasSearchContext,HasTestBenchCommandExecutor,org.openqa.selenium.SearchContext,org.openqa.selenium.TakesScreenshot,org.openqa.selenium.WebElement,org.openqa.selenium.WrapsElement
- Direct Known Subclasses:
TableDataCellElement,TableHeaderCellElement
A TestBench element representing either kind of table cell, a
<td> or a <th>. It carries no
@Element annotation of its own: it is the type
TableRowElement.getCells() speaks in when the kind of cell does not
matter, mirroring TableCell on the component side.- Since:
- 25.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns thecolspanof this cell, or 1 if it carries none.intReturns how many rows this cell actually covers, which is whatgetRowspan()says only when the cell neither uses 0 nor reaches past the end of its row group.intReturns therowspanof this cell as written, or 1 if it carries none.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, 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
-
TableCellElement
public TableCellElement()
-
-
Method Details
-
getColspan
public int getColspan()Returns thecolspanof this cell, or 1 if it carries none. The value comes from the DOM property, so the browser has already applied the rules: an absent, negative or unparseablecolspanreads as 1, and so does 0, that value having been dropped from HTML.- Returns:
- the number of columns this cell covers, at least 1.
-
getRowspan
public int getRowspan()Returns therowspanof this cell as written, or 1 if it carries none. The value comes from the DOM property, so an absent, negative or unparseablerowspanreads as 1 ? but 0 is kept, since it is meaningful in HTML and means the cell reaches to the end of its row group. UsegetResolvedRowspan()for the number of rows that works out to.- Returns:
- the
rowspanof this cell, where 0 means to the end of the row group.
-
getResolvedRowspan
public int getResolvedRowspan()Returns how many rows this cell actually covers, which is whatgetRowspan()says only when the cell neither uses 0 nor reaches past the end of its row group. Arowspanof 0 resolves to the number of rows left in the<thead>,<tbody>or<tfoot>holding the cell, and a span longer than that group is cut off at its end, because a row span may not cross from one row group into the next.There is no counterpart for
colspan: 0 is not a legal value for it, sogetColspan()is already the number of columns covered.- Returns:
- the number of rows this cell covers, at least 1.
-