From 1d40a782ea3d17e344cff026cc8cadf893ee0c7c Mon Sep 17 00:00:00 2001 From: Pekka Maanpaa Date: Mon, 18 Jun 2018 11:48:38 +0300 Subject: [PATCH] Wait for shadow-root child in ChildOrderIT --- .../com/vaadin/flow/uitest/ui/template/ChildOrderIT.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/template/ChildOrderIT.java b/flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/template/ChildOrderIT.java index eef2b309cc6..3bbf1a3e397 100644 --- a/flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/template/ChildOrderIT.java +++ b/flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/template/ChildOrderIT.java @@ -22,6 +22,7 @@ import org.junit.Before; import org.junit.Test; import org.openqa.selenium.By; +import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebElement; import com.vaadin.flow.component.html.testbench.DivElement; @@ -44,6 +45,14 @@ public void init() { open(); waitForElementPresent(By.tagName("child-order-template")); root = $("child-order-template").first(); + waitUntil(driver -> { + try { + root.$(DivElement.class).id("containerWithElement"); + } catch (NoSuchElementException e) { + return false; + } + return true; + }); } @Test