aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
index 15585c7e45..c8ca4c12a1 100644
--- a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
+++ b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
@@ -67,6 +67,7 @@ import com.vaadin.testbench.TestBench;
import com.vaadin.testbench.TestBenchDriverProxy;
import com.vaadin.testbench.TestBenchElement;
import com.vaadin.testbench.TestBenchTestCase;
+import com.vaadin.testbench.elements.AbstractElement;
import com.vaadin.testbench.elements.CheckBoxElement;
import com.vaadin.testbench.elements.LabelElement;
import com.vaadin.testbench.elements.TableElement;
@@ -1332,4 +1333,16 @@ public abstract class AbstractTB3Test extends TestBenchTestCase {
checkbox.findElement(By.xpath("input")).click();
}
+ @Override
+ public boolean isElementPresent(Class<? extends AbstractElement> clazz) {
+ // This is a bug in TB4 as isElementPresent(..) should just return true
+ // or false but can also throw exceptions. The problem is possibly if
+ // this is run when the Vaadin app is not initialized yet
+ try {
+ return super.isElementPresent(clazz);
+ } catch (NoSuchElementException e) {
+ return false;
+ }
+ }
+
}