summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/tb3
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2014-06-27 10:34:42 +0300
committerSauli Tähkäpää <sauli@vaadin.com>2014-06-27 13:35:15 +0300
commitd8f1d1ebfbe5bdae8e3fbaafc2d5513245528c94 (patch)
treec3c05c9ff9b7caad1ddc1eca422491c82064b3bb /uitest/src/com/vaadin/tests/tb3
parent75278f98c648a483d32a42655115b9b0e01c15b9 (diff)
downloadvaadin-framework-d8f1d1ebfbe5bdae8e3fbaafc2d5513245528c94.tar.gz
vaadin-framework-d8f1d1ebfbe5bdae8e3fbaafc2d5513245528c94.zip
Fix PushConfigurationStreamingTest for IE.
Change-Id: Iac342bdca90794a02c5966231142a585e2eeb216
Diffstat (limited to 'uitest/src/com/vaadin/tests/tb3')
-rw-r--r--uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
index 14be226de6..e5cceca6b8 100644
--- a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
+++ b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
@@ -165,6 +165,36 @@ public abstract class AbstractTB3Test extends TestBenchTestCase {
return ((Locatable) element.getWrappedElement()).getCoordinates();
}
+ private boolean hasDebugMessage(String message) {
+ return getDebugMessage(message) != null;
+ }
+
+ private WebElement getDebugMessage(String message) {
+ return driver.findElement(By.xpath(String.format(
+ "//span[@class='v-debugwindow-message' and text()='%s']",
+ message)));
+ }
+
+ protected void waitForDebugMessage(final String expectedMessage) {
+ waitForDebugMessage(expectedMessage, 30);
+ }
+
+ protected void waitForDebugMessage(final String expectedMessage, int timeout) {
+ waitUntil(new ExpectedCondition<Boolean>() {
+
+ @Override
+ public Boolean apply(WebDriver input) {
+ return hasDebugMessage(expectedMessage);
+ }
+ }, timeout);
+ }
+
+ protected void clearDebugMessages() {
+ driver.findElement(
+ By.xpath("//button[@class='v-debugwindow-button' and @title='Clear log']"))
+ .click();
+ }
+
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface RunLocally {