]> source.dussan.org Git - vaadin-framework.git/commitdiff
copied waitUntil to selectMenuPath from FW8 (#11415)
authorOlli Tietäväinen <ollit@vaadin.com>
Thu, 10 Jan 2019 11:58:06 +0000 (13:58 +0200)
committerGitHub <noreply@github.com>
Thu, 10 Jan 2019 11:58:06 +0000 (13:58 +0200)
uitest/src/test/java/com/vaadin/tests/tb3/AbstractTB3Test.java

index 4df23a54baaf0581026c3d37e8e9cf19aa0dcb0e..81d1b48a0bfd205bc212c2c5bf13cbe05dc78e86 100644 (file)
@@ -1057,6 +1057,15 @@ public abstract class AbstractTB3Test extends ParallelTest {
     protected void selectMenuPath(String... menuCaptions) {
         selectMenu(menuCaptions[0], true);
 
+        // Make sure menu popup is opened.
+        waitUntil(new ExpectedCondition<Boolean>() {
+            @Override
+            public Boolean apply(WebDriver webDriver) {
+                return isElementPresent(By.className("gwt-MenuBarPopup"))
+                        || isElementPresent(By.className("v-menubar-popup"));
+            }
+        });
+        
         // Move to the menu item opened below the menu bar.
         new Actions(getDriver())
                 .moveByOffset(0,