Skip to content

Commit

Permalink
Update to Selenium 4.25.0 (#147) +semver:feature
Browse files Browse the repository at this point in the history
* Update to Selenium 4.25.0 +semver:feature

* Update ChromeDownloadsForm.java

* Add waiting to stabilize testHiddenElementsNotDisplayed
  • Loading branch information
mialeska authored Oct 16, 2024
1 parent 0491b03 commit 974cf90
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<dependency>
<groupId>com.github.aquality-automation</groupId>
<artifactId>aquality-selenium-core</artifactId>
<version>4.1.0</version>
<version>4.2.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand All @@ -92,12 +92,12 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.17.2</version>
<version>2.18.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.13</version>
<version>2.0.16</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/forms/ChromeDownloadsForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

public class ChromeDownloadsForm extends Form {
private static final String ADDRESS = "chrome://downloads/";
public static final By NESTED_SHADOW_ROOT_LOCATOR = By.id("moreActionsMenu");
public static final By NESTED_SHADOW_ROOT_LOCATOR = By.cssSelector("cr-toolbar");
public static final By DIV_ELEMENTS_LOCATOR = By.cssSelector("div");

private final ILabel lblDownloadsToolbar = getFormLabel().findElementInShadowRoot(By.cssSelector("downloads-toolbar"), "Downloads toolbar", ILabel.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -56,7 +57,7 @@ public void testHiddenElementsExist(Function<ElementsCount, List<ILabel>> elemen
public void testHiddenElementsNotDisplayed(Function<ElementsCount, List<ILabel>> elementsListProvider) {
List<ILabel> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import aquality.selenium.browser.AqualityServices;
import aquality.selenium.browser.devtools.EmulationHandling;
import com.google.common.collect.ImmutableMap;
import org.openqa.selenium.devtools.v128.emulation.Emulation;
import org.openqa.selenium.devtools.v128.emulation.model.DisplayFeature;
import org.openqa.selenium.devtools.v129.emulation.Emulation;
import org.openqa.selenium.devtools.v129.emulation.model.DisplayFeature;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import aquality.selenium.browser.AqualityServices;
import org.openqa.selenium.TimeoutException;
import org.openqa.selenium.devtools.v128.network.model.ConnectionType;
import org.openqa.selenium.devtools.v129.network.model.ConnectionType;
import org.testng.Assert;
import org.testng.annotations.Test;
import tests.BaseTest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import manytools.BrowserLanguageForm;
import manytools.UserAgentForm;
import org.openqa.selenium.devtools.idealized.Network;
import org.openqa.selenium.devtools.v128.emulation.Emulation;
import org.openqa.selenium.devtools.v129.emulation.Emulation;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
Expand Down

0 comments on commit 974cf90

Please sign in to comment.