summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/testbench/elements/GridElement.java
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2015-02-06 11:34:20 +0200
committerLeif Åstrand <leif@vaadin.com>2015-02-06 11:34:20 +0200
commitee1fa835047a02f2982c7b8da9abf15b06c9c919 (patch)
tree75e2637ec49466313cfa2faf1cf2bd948db81095 /uitest/src/com/vaadin/testbench/elements/GridElement.java
parent0e141e31bb30a0ab6726129f3c9fa892c92573e4 (diff)
downloadvaadin-framework-ee1fa835047a02f2982c7b8da9abf15b06c9c919.tar.gz
vaadin-framework-ee1fa835047a02f2982c7b8da9abf15b06c9c919.zip
Show editor save error (#16602)
Change-Id: I2727a9fabef4291798e97495c2df86b077387cbb
Diffstat (limited to 'uitest/src/com/vaadin/testbench/elements/GridElement.java')
-rw-r--r--uitest/src/com/vaadin/testbench/elements/GridElement.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/testbench/elements/GridElement.java b/uitest/src/com/vaadin/testbench/elements/GridElement.java
index 5d85de4eb6..e04140a3e0 100644
--- a/uitest/src/com/vaadin/testbench/elements/GridElement.java
+++ b/uitest/src/com/vaadin/testbench/elements/GridElement.java
@@ -129,6 +129,22 @@ public class GridElement extends AbstractComponentElement {
public void cancel() {
findElement(By.className("v-grid-editor-cancel")).click();
}
+
+ /**
+ * Gets the error message text, or <code>null</code> if no message is
+ * present.
+ */
+ public String getErrorMessage() {
+ WebElement messageWrapper = findElement(By
+ .className("v-grid-editor-message"));
+ List<WebElement> divs = messageWrapper.findElements(By
+ .tagName("div"));
+ if (divs.isEmpty()) {
+ return null;
+ } else {
+ return divs.get(0).getText();
+ }
+ }
}
/**