aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java')
-rw-r--r--uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
index eda7d5b815..1c395c1805 100644
--- a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
+++ b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
@@ -956,4 +956,24 @@ public abstract class AbstractTB3Test extends ParallelTest {
protected void click(CheckBoxElement checkbox) {
checkbox.findElement(By.xpath("input")).click();
}
+
+ /**
+ * Asserts that an element is present
+ *
+ * @param by
+ * the locatore for the element
+ */
+ protected void assertElementPresent(By by) {
+ Assert.assertTrue("Element is not present", isElementPresent(by));
+ }
+
+ /**
+ * Asserts that an element is not present
+ *
+ * @param by
+ * the locatore for the element
+ */
+ protected void assertElementNotPresent(By by) {
+ Assert.assertFalse("Element is present", isElementPresent(by));
+ }
}