diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-08-24 14:05:02 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-08-29 08:56:56 +0000 |
commit | b4861eda6bbda053277e3fb6858b8a94e8c3243b (patch) | |
tree | 5b120ff177526702a4586eeb4afdd46aef341ea1 /uitest-common | |
parent | 010954022ddf6d0bcac3df9a098ce67603d3322b (diff) | |
download | vaadin-framework-b4861eda6bbda053277e3fb6858b8a94e8c3243b.tar.gz vaadin-framework-b4861eda6bbda053277e3fb6858b8a94e8c3243b.zip |
Implement DetailsGenerators for Grid
Change-Id: I09057b990f10bde6cf72a16677e58cb2bc9a7029
Diffstat (limited to 'uitest-common')
-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)); + } +} |