From c5d62e8906e25ca3896b676e9110d24df3924849 Mon Sep 17 00:00:00 2001 From: An Vo Date: Thu, 5 Sep 2024 11:51:22 +0700 Subject: [PATCH] Update Selenium 4.24.0 support CDP 128 --- CHANGELOG.txt | 6 ++ config.toml | 28 ------ docker-compose-v3-dynamic-grid.yml | 25 ----- docker-compose-v3-full-grid.yml | 98 ------------------- pom.xml | 10 +- .../java/com/anhtester/keywords/WebUI.java | 4 +- 6 files changed, 13 insertions(+), 158 deletions(-) delete mode 100644 config.toml delete mode 100644 docker-compose-v3-dynamic-grid.yml delete mode 100644 docker-compose-v3-full-grid.yml diff --git a/CHANGELOG.txt b/CHANGELOG.txt index af6d3ee..2bb6b66 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,9 @@ +v2.4.4 +====== +Sep 05, 2024 +* Update Selenium 4.24.0 +* Support CDP 128 + v2.4.3 ====== Aug 14, 2024 diff --git a/config.toml b/config.toml deleted file mode 100644 index 4f3d3a6..0000000 --- a/config.toml +++ /dev/null @@ -1,28 +0,0 @@ -[docker] -# Configs have a mapping between the Docker image to use and the capabilities that need to be matched to -# start a container with the given image. -configs = [ - "selenium/standalone-firefox:4.21.0-20240522", '{"browserName": "firefox"}', - "selenium/standalone-chrome:4.21.0-20240522", '{"browserName": "chrome"}', - "selenium/standalone-edge:4.21.0-20240522", '{"browserName": "MicrosoftEdge"}' -] - -host-config-keys = ["Dns", "DnsOptions", "DnsSearch", "ExtraHosts", "Binds"] - -# URL for connecting to the docker daemon -# Most simple approach, leave it as http://127.0.0.1:2375, and mount /var/run/docker.sock. -# 127.0.0.1 is used because internally the container uses socat when /var/run/docker.sock is mounted -# If var/run/docker.sock is not mounted: -# Windows: make sure Docker Desktop exposes the daemon via tcp, and use http://host.docker.internal:2375. -# macOS: install socat and run the following command, socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock, -# then use http://host.docker.internal:2375. -# Linux: varies from machine to machine, please mount /var/run/docker.sock. If this does not work, please create an issue. -url = "http://127.0.0.1:2375" -# Docker image used for video recording -video-image = "selenium/video:ffmpeg-6.1.1-20240522" - -# Uncomment the following section if you are running the node on a separate VM -# Fill out the placeholders with appropriate values -#[server] -#host = -#port = \ No newline at end of file diff --git a/docker-compose-v3-dynamic-grid.yml b/docker-compose-v3-dynamic-grid.yml deleted file mode 100644 index 761416e..0000000 --- a/docker-compose-v3-dynamic-grid.yml +++ /dev/null @@ -1,25 +0,0 @@ -# To execute this docker compose yml file use `docker compose -f docker-compose-v3-dynamic-grid.yml up` -# Add the `-d` flag at the end for detached execution -# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-dynamic-grid.yml down` -version: "3" -services: - node-docker: - image: selenium/node-docker:4.21.0-20240522 - volumes: - - ./assets:/opt/selenium/assets - - ./NodeDocker/config.toml:/opt/bin/config.toml - - /var/run/docker.sock:/var/run/docker.sock - depends_on: - - selenium-hub - environment: - - SE_EVENT_BUS_HOST=selenium-hub - - SE_EVENT_BUS_PUBLISH_PORT=4442 - - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 - - selenium-hub: - image: selenium/hub:4.21.0-20240522 - container_name: selenium-hub - ports: - - "4442:4442" - - "4443:4443" - - "4444:4444" diff --git a/docker-compose-v3-full-grid.yml b/docker-compose-v3-full-grid.yml deleted file mode 100644 index 7625f96..0000000 --- a/docker-compose-v3-full-grid.yml +++ /dev/null @@ -1,98 +0,0 @@ -# To execute this docker compose yml file use `docker compose -f docker-compose-v3-full-grid.yml up -d` -# Add the `-d` flag at the end for detached execution -# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-full-grid.yml down` -version: "3" -services: - selenium-event-bus: - image: selenium/event-bus:latest - container_name: selenium-event-bus - ports: - - "4442:4442" - - "4443:4443" - - "5557:5557" - - selenium-sessions: - image: selenium/sessions:latest - container_name: selenium-sessions - ports: - - "5556:5556" - depends_on: - - selenium-event-bus - environment: - - SE_EVENT_BUS_HOST=selenium-event-bus - - SE_EVENT_BUS_PUBLISH_PORT=4442 - - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 - - selenium-session-queue: - image: selenium/session-queue:latest - container_name: selenium-session-queue - ports: - - "5559:5559" - - selenium-distributor: - image: selenium/distributor:latest - container_name: selenium-distributor - ports: - - "5553:5553" - depends_on: - - selenium-event-bus - - selenium-sessions - - selenium-session-queue - environment: - - SE_EVENT_BUS_HOST=selenium-event-bus - - SE_EVENT_BUS_PUBLISH_PORT=4442 - - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 - - SE_SESSIONS_MAP_HOST=selenium-sessions - - SE_SESSIONS_MAP_PORT=5556 - - SE_SESSION_QUEUE_HOST=selenium-session-queue - - SE_SESSION_QUEUE_PORT=5559 - - selenium-router: - image: selenium/router:latest - container_name: selenium-router - ports: - - "4444:4444" - depends_on: - - selenium-distributor - - selenium-sessions - - selenium-session-queue - environment: - - SE_DISTRIBUTOR_HOST=selenium-distributor - - SE_DISTRIBUTOR_PORT=5553 - - SE_SESSIONS_MAP_HOST=selenium-sessions - - SE_SESSIONS_MAP_PORT=5556 - - SE_SESSION_QUEUE_HOST=selenium-session-queue - - SE_SESSION_QUEUE_PORT=5559 - - chrome: - image: selenium/node-chrome:latest - shm_size: 2gb - depends_on: - - selenium-event-bus - environment: - - SE_EVENT_BUS_HOST=selenium-event-bus - - SE_EVENT_BUS_PUBLISH_PORT=4442 - - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 - - SE_NODE_MAX_SESSIONS=5 - - edge: - image: selenium/node-edge:latest - shm_size: 2gb - depends_on: - - selenium-event-bus - environment: - - SE_EVENT_BUS_HOST=selenium-event-bus - - SE_EVENT_BUS_PUBLISH_PORT=4442 - - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 - - SE_NODE_MAX_SESSIONS=4 - - firefox: - image: selenium/node-firefox:latest - shm_size: 2gb - depends_on: - - selenium-event-bus - environment: - - SE_EVENT_BUS_HOST=selenium-event-bus - - SE_EVENT_BUS_PUBLISH_PORT=4442 - - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 - - SE_NODE_MAX_SESSIONS=3 \ No newline at end of file diff --git a/pom.xml b/pom.xml index d6ec7db..78c5918 100644 --- a/pom.xml +++ b/pom.xml @@ -24,9 +24,9 @@ UTF-8 UTF-8 17 - 3.3.1 + 3.5.0 3.13.0 - 4.23.1 + 4.24.0 7.10.2 1.9.22.1 1.5.4 @@ -49,12 +49,12 @@ 8.0.33 3.5.3 1.18.34 - 33.2.1-jre + 33.3.0-jre 1.6.2 1.17 2.17.2 - 7.7.0 - 3.16.0 + 7.9.1 + 3.17.0 9.0.0 2.9.0 diff --git a/src/main/java/com/anhtester/keywords/WebUI.java b/src/main/java/com/anhtester/keywords/WebUI.java index 5c21658..71e24ad 100644 --- a/src/main/java/com/anhtester/keywords/WebUI.java +++ b/src/main/java/com/anhtester/keywords/WebUI.java @@ -30,8 +30,8 @@ import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.devtools.DevTools; import org.openqa.selenium.devtools.HasDevTools; -import org.openqa.selenium.devtools.v127.network.Network; -import org.openqa.selenium.devtools.v127.network.model.Headers; +import org.openqa.selenium.devtools.v128.network.Network; +import org.openqa.selenium.devtools.v128.network.model.Headers; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.print.PrintOptions; import org.openqa.selenium.support.ui.ExpectedCondition;