diff --git a/src/test/java/tests/integration/elements/HiddenElementsTests.java b/src/test/java/tests/integration/elements/HiddenElementsTests.java index bebe1e8..c2f0414 100644 --- a/src/test/java/tests/integration/elements/HiddenElementsTests.java +++ b/src/test/java/tests/integration/elements/HiddenElementsTests.java @@ -1,5 +1,6 @@ package tests.integration.elements; +import aquality.selenium.browser.AqualityServices; import aquality.selenium.core.elements.ElementState; import aquality.selenium.core.elements.ElementsCount; import aquality.selenium.elements.interfaces.ILabel; @@ -56,7 +57,7 @@ public void testHiddenElementsExist(Function> elemen public void testHiddenElementsNotDisplayed(Function> elementsListProvider) { List listElements = elementsListProvider.apply(ElementsCount.MORE_THAN_ZERO); Assert.assertFalse(listElements.isEmpty()); - Assert.assertTrue(listElements.stream().noneMatch(el -> el.state().isDisplayed())); + Assert.assertTrue(AqualityServices.getConditionalWait().waitFor(() -> listElements.stream().noneMatch(el -> el.state().isDisplayed()))); } @Test