diff options
Diffstat (limited to 'uitest-common/src')
-rw-r--r-- | uitest-common/src/main/java/com/vaadin/testbench/customelements/GridElement.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/uitest-common/src/main/java/com/vaadin/testbench/customelements/GridElement.java b/uitest-common/src/main/java/com/vaadin/testbench/customelements/GridElement.java new file mode 100644 index 0000000000..dd1e2ca4e3 --- /dev/null +++ b/uitest-common/src/main/java/com/vaadin/testbench/customelements/GridElement.java @@ -0,0 +1,31 @@ +package com.vaadin.testbench.customelements; + +import org.openqa.selenium.NoSuchElementException; + +import com.vaadin.testbench.By; +import com.vaadin.testbench.TestBenchElement; +import com.vaadin.testbench.elementsbase.ServerClass; + +@ServerClass("com.vaadin.ui.Grid") +public class GridElement extends com.vaadin.testbench.elements.GridElement { + + /** + * Gets the element that contains the details of a row. + * + * @since + * @param rowIndex + * the index of the row for the details + * @return the element that contains the details of a row. <code>null</code> + * if no widget is defined for the detials row + * @throws NoSuchElementException + * if the given details row is currently not open + */ + public TestBenchElement getDetails(int rowIndex) + throws NoSuchElementException { + return getSubPart("#details[" + rowIndex + "]"); + } + + private TestBenchElement getSubPart(String subPartSelector) { + return (TestBenchElement) findElement(By.vaadin(subPartSelector)); + } +} |