summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/testbench/elements/GridElement.java6
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridEditorClientTest.java5
2 files changed, 5 insertions, 6 deletions
diff --git a/uitest/src/com/vaadin/testbench/elements/GridElement.java b/uitest/src/com/vaadin/testbench/elements/GridElement.java
index 5a27bc1444..6b1279d2c2 100644
--- a/uitest/src/com/vaadin/testbench/elements/GridElement.java
+++ b/uitest/src/com/vaadin/testbench/elements/GridElement.java
@@ -106,8 +106,7 @@ public class GridElement extends AbstractComponentElement {
* useless.
*/
public void save() {
- List<WebElement> buttons = findElements(By.xpath("./button"));
- buttons.get(0).click();
+ findElement(By.className("v-grid-editor-save")).click();
}
/**
@@ -117,8 +116,7 @@ public class GridElement extends AbstractComponentElement {
* useless.
*/
public void cancel() {
- List<WebElement> buttons = findElements(By.xpath("./button"));
- buttons.get(1).click();
+ findElement(By.className("v-grid-editor-cancel")).click();
}
}
diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridEditorClientTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridEditorClientTest.java
index f6f2fac074..30481ebc65 100644
--- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridEditorClientTest.java
+++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridEditorClientTest.java
@@ -117,8 +117,9 @@ public class GridEditorClientTest extends GridBasicClientFeaturesTest {
selectMenuPath("Component", "State", "Selection mode", "multi");
selectMenuPath(EDIT_ROW_5);
- WebElement editor = getEditor();
- List<WebElement> selectorDivs = editor.findElements(By
+ WebElement editorCells = findElement(By
+ .className("v-grid-editor-cells"));
+ List<WebElement> selectorDivs = editorCells.findElements(By
.cssSelector("div"));
assertTrue("selector column cell should've been empty", selectorDivs