From daeaf5d9cd4ac4cb48359829120e32c5ccae7504 Mon Sep 17 00:00:00 2001 From: Robert Goldmann <deadlocker@gmx.de> Date: Mon, 12 Jun 2023 23:27:09 +0200 Subject: [PATCH] stabilized selenium test --- .../budgetmaster/integration/selenium/FilterTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BudgetMasterServer/src/test/java/de/deadlocker8/budgetmaster/integration/selenium/FilterTest.java b/BudgetMasterServer/src/test/java/de/deadlocker8/budgetmaster/integration/selenium/FilterTest.java index 49c042456..deb5742fd 100644 --- a/BudgetMasterServer/src/test/java/de/deadlocker8/budgetmaster/integration/selenium/FilterTest.java +++ b/BudgetMasterServer/src/test/java/de/deadlocker8/budgetmaster/integration/selenium/FilterTest.java @@ -45,8 +45,8 @@ class FilterTest extends SeleniumTestBase driver.findElement(By.id("section-type")).click(); wait = new WebDriverWait(driver, Duration.ofSeconds(5)); - wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("#section-type .text-default"))); - final WebElement checkBox = driver.findElement(By.cssSelector("#section-type .text-default")); + wait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.cssSelector("#section-type .text-default"))); + final WebElement checkBox = driver.findElements(By.cssSelector("#section-type .text-default")).get(0); checkBox.click(); driver.findElement(By.id("buttonApplyFilter")).click(); -- GitLab