From 83a66c7b00a088e3c1625487de9bc8d9f6dd8159 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Fri, 29 Mar 2024 09:12:10 +0000
Subject: [PATCH 1/8] fix(deps): update dependency
org.seleniumhq.selenium:selenium-java to v4.19.1
---
examples/java/build.gradle | 2 +-
examples/java/pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/java/build.gradle b/examples/java/build.gradle
index 37a27291590f..bcd335691b39 100644
--- a/examples/java/build.gradle
+++ b/examples/java/build.gradle
@@ -10,7 +10,7 @@ repositories {
}
dependencies {
- testImplementation 'org.seleniumhq.selenium:selenium-java:4.18.1'
+ testImplementation 'org.seleniumhq.selenium:selenium-java:4.19.1'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
}
diff --git a/examples/java/pom.xml b/examples/java/pom.xml
index 369062634b01..bcc6c4038f79 100644
--- a/examples/java/pom.xml
+++ b/examples/java/pom.xml
@@ -29,7 +29,7 @@
org.seleniumhq.selenium
selenium-java
- 4.18.1
+ 4.19.1
org.seleniumhq.selenium
From f853ab4f224f3fb0825aefe62b9fd49776eefa3a Mon Sep 17 00:00:00 2001
From: Puja Jagani
Date: Fri, 29 Mar 2024 15:05:17 +0530
Subject: [PATCH 2/8] [java] Updates imports for BiDi code examples
---
.../selenium/bidirectional/webdriver_bidi/ActionsTest.java | 2 +-
.../webdriver_bidi/BrowsingContextInspectorTest.java | 2 +-
.../bidirectional/webdriver_bidi/LocateNodesTest.java | 2 +-
.../dev/selenium/bidirectional/webdriver_bidi/LogTest.java | 2 +-
.../bidirectional/webdriver_bidi/NetworkCommandsTest.java | 2 +-
.../bidirectional/webdriver_bidi/NetworkEventsTest.java | 2 +-
.../bidirectional/webdriver_bidi/ScriptEventsTest.java | 2 +-
.../dev/selenium/bidirectional/webdriver_bidi/ScriptTest.java | 4 ++--
8 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ActionsTest.java b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ActionsTest.java
index 1e51bf4b8d59..ffc692a8fc9a 100644
--- a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ActionsTest.java
+++ b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ActionsTest.java
@@ -12,7 +12,7 @@
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebElement;
-import org.openqa.selenium.bidi.Input;
+import org.openqa.selenium.bidi.module.Input;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.interactions.Actions;
diff --git a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java
index 8635dd6648a2..bd12d14e2b26 100644
--- a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java
+++ b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java
@@ -10,7 +10,7 @@
import org.junit.jupiter.api.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WindowType;
-import org.openqa.selenium.bidi.BrowsingContextInspector;
+import org.openqa.selenium.bidi.module.BrowsingContextInspector;
import org.openqa.selenium.bidi.browsingcontext.BrowsingContext;
import org.openqa.selenium.bidi.browsingcontext.BrowsingContextInfo;
import org.openqa.selenium.bidi.browsingcontext.NavigationInfo;
diff --git a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LocateNodesTest.java b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LocateNodesTest.java
index 5e5986d679f4..22c7f0f8ee5c 100644
--- a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LocateNodesTest.java
+++ b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LocateNodesTest.java
@@ -9,7 +9,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
-import org.openqa.selenium.bidi.Script;
+import org.openqa.selenium.bidi.module.Script;
import org.openqa.selenium.bidi.browsingcontext.BrowsingContext;
import org.openqa.selenium.bidi.browsingcontext.LocateNodeParameters;
import org.openqa.selenium.bidi.browsingcontext.Locator;
diff --git a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java
index c5d634576faa..1abd3f15505d 100644
--- a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java
+++ b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java
@@ -9,7 +9,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.By;
-import org.openqa.selenium.bidi.LogInspector;
+import org.openqa.selenium.bidi.module.LogInspector;
import org.openqa.selenium.bidi.log.ConsoleLogEntry;
import org.openqa.selenium.bidi.log.JavascriptLogEntry;
import org.openqa.selenium.bidi.log.LogLevel;
diff --git a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/NetworkCommandsTest.java b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/NetworkCommandsTest.java
index 86dd478f1d3d..8050892d27ca 100644
--- a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/NetworkCommandsTest.java
+++ b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/NetworkCommandsTest.java
@@ -12,7 +12,7 @@
import org.openqa.selenium.TimeoutException;
import org.openqa.selenium.UsernameAndPassword;
import org.openqa.selenium.WebElement;
-import org.openqa.selenium.bidi.Network;
+import org.openqa.selenium.bidi.module.Network;
import org.openqa.selenium.bidi.network.AddInterceptParameters;
import org.openqa.selenium.bidi.network.InterceptPhase;
import org.openqa.selenium.firefox.FirefoxDriver;
diff --git a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/NetworkEventsTest.java b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/NetworkEventsTest.java
index 087b3134cfad..d00d5af9ce8d 100644
--- a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/NetworkEventsTest.java
+++ b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/NetworkEventsTest.java
@@ -9,7 +9,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.Cookie;
-import org.openqa.selenium.bidi.Network;
+import org.openqa.selenium.bidi.module.Network;
import org.openqa.selenium.bidi.network.BeforeRequestSent;
import org.openqa.selenium.bidi.network.ResponseDetails;
import org.openqa.selenium.firefox.FirefoxDriver;
diff --git a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java
index 72b65d008a56..d02e77115b7f 100644
--- a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java
+++ b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java
@@ -11,7 +11,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
-import org.openqa.selenium.bidi.Script;
+import org.openqa.selenium.bidi.module.Script;
import org.openqa.selenium.bidi.browsingcontext.BrowsingContext;
import org.openqa.selenium.bidi.script.LocalValue;
import org.openqa.selenium.bidi.script.Message;
diff --git a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptTest.java b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptTest.java
index 07b7d613acc7..2e1ab65e9355 100644
--- a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptTest.java
+++ b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptTest.java
@@ -18,8 +18,8 @@
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.WindowType;
-import org.openqa.selenium.bidi.LogInspector;
-import org.openqa.selenium.bidi.Script;
+import org.openqa.selenium.bidi.module.LogInspector;
+import org.openqa.selenium.bidi.module.Script;
import org.openqa.selenium.bidi.browsingcontext.BrowsingContext;
import org.openqa.selenium.bidi.browsingcontext.ReadinessState;
import org.openqa.selenium.bidi.log.ConsoleLogEntry;
From 9358bb419872b4ed4c1c7be2d9b3f48c9f6cdf3c Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Fri, 19 Jul 2024 10:35:41 +0000
Subject: [PATCH 3/8] fix(deps): update dependency
org.seleniumhq.selenium:selenium-java to v4.23.0
---
examples/java/build.gradle | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/java/build.gradle b/examples/java/build.gradle
index 5192d2265361..12f6a5dc007c 100644
--- a/examples/java/build.gradle
+++ b/examples/java/build.gradle
@@ -10,7 +10,7 @@ repositories {
}
dependencies {
- testImplementation 'org.seleniumhq.selenium:selenium-java:4.22.0'
+ testImplementation 'org.seleniumhq.selenium:selenium-java:4.23.0'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.3'
}
From 9ca9fe53f41d545402fa5d03852d64f1ba34950c Mon Sep 17 00:00:00 2001
From: Puja Jagani
Date: Mon, 22 Jul 2024 12:58:05 +0530
Subject: [PATCH 4/8] Fix the examples
---
.../java/dev/selenium/bidi/cdp/CdpApiTest.java | 16 +++-------------
.../java/dev/selenium/bidi/cdp/NetworkTest.java | 8 ++++----
.../bidirectional/webdriver_bidi/LogTest.java | 2 +-
3 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java b/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java
index 1b501ea2a185..07026a34bec0 100644
--- a/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java
+++ b/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java
@@ -4,31 +4,21 @@
import dev.selenium.BaseTest;
import java.time.Duration;
import java.util.Base64;
-import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
-import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicBoolean;
-
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.By;
-import org.openqa.selenium.Cookie;
-import org.openqa.selenium.JavascriptException;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.HasDevTools;
-import org.openqa.selenium.devtools.v124.browser.Browser;
-import org.openqa.selenium.devtools.v124.network.Network;
-import org.openqa.selenium.devtools.v124.network.model.Headers;
-import org.openqa.selenium.devtools.v124.performance.Performance;
-import org.openqa.selenium.devtools.v124.performance.model.Metric;
-import org.openqa.selenium.devtools.v124.runtime.Runtime;
+import org.openqa.selenium.devtools.v127.browser.Browser;
+import org.openqa.selenium.devtools.v127.network.Network;
+import org.openqa.selenium.devtools.v127.network.model.Headers;
import org.openqa.selenium.support.ui.WebDriverWait;
public class CdpApiTest extends BaseTest {
diff --git a/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java b/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java
index f97b84709044..3a0dd3526c3e 100644
--- a/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java
+++ b/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java
@@ -21,10 +21,10 @@
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.HasDevTools;
import org.openqa.selenium.devtools.NetworkInterceptor;
-import org.openqa.selenium.devtools.v124.browser.Browser;
-import org.openqa.selenium.devtools.v124.network.Network;
-import org.openqa.selenium.devtools.v124.performance.Performance;
-import org.openqa.selenium.devtools.v124.performance.model.Metric;
+import org.openqa.selenium.devtools.v127.browser.Browser;
+import org.openqa.selenium.devtools.v127.network.Network;
+import org.openqa.selenium.devtools.v127.performance.Performance;
+import org.openqa.selenium.devtools.v127.performance.model.Metric;
import org.openqa.selenium.remote.http.*;
import org.openqa.selenium.support.ui.WebDriverWait;
diff --git a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java
index 1abd3f15505d..19dd0f788132 100644
--- a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java
+++ b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java
@@ -54,7 +54,7 @@ void testListenToConsoleLog() throws ExecutionException, InterruptedException, T
ConsoleLogEntry logEntry = future.get(5, TimeUnit.SECONDS);
Assertions.assertEquals("Hello, world!", logEntry.getText());
- Assertions.assertNull(logEntry.getRealm());
+
Assertions.assertEquals(1, logEntry.getArgs().size());
Assertions.assertEquals("console", logEntry.getType());
Assertions.assertEquals("log", logEntry.getMethod());
From 01f88b107e2ebe75c2052c6cf7ccdafbce9f441b Mon Sep 17 00:00:00 2001
From: Puja Jagani
Date: Mon, 22 Jul 2024 13:36:24 +0530
Subject: [PATCH 5/8] Adding CDP dependency
---
examples/java/selenium-examples.iml | 6 ++++++
1 file changed, 6 insertions(+)
create mode 100644 examples/java/selenium-examples.iml
diff --git a/examples/java/selenium-examples.iml b/examples/java/selenium-examples.iml
new file mode 100644
index 000000000000..c38c7c85ca50
--- /dev/null
+++ b/examples/java/selenium-examples.iml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
From 159555861eda4e3cb9d1c02aa526d4785b7c58f5 Mon Sep 17 00:00:00 2001
From: Puja Jagani
Date: Mon, 22 Jul 2024 13:48:22 +0530
Subject: [PATCH 6/8] Delete examples/java/selenium-examples.iml
---
examples/java/selenium-examples.iml | 6 ------
1 file changed, 6 deletions(-)
delete mode 100644 examples/java/selenium-examples.iml
diff --git a/examples/java/selenium-examples.iml b/examples/java/selenium-examples.iml
deleted file mode 100644
index c38c7c85ca50..000000000000
--- a/examples/java/selenium-examples.iml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
From 4b8f7dffe5790215a4dbad382ce1aeac963f6369 Mon Sep 17 00:00:00 2001
From: Puja Jagani
Date: Mon, 22 Jul 2024 13:51:58 +0530
Subject: [PATCH 7/8] Trying a different CDP version
---
.../src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java | 6 +++---
.../src/test/java/dev/selenium/bidi/cdp/NetworkTest.java | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java b/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java
index 07026a34bec0..a85170254d04 100644
--- a/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java
+++ b/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java
@@ -16,9 +16,9 @@
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.HasDevTools;
-import org.openqa.selenium.devtools.v127.browser.Browser;
-import org.openqa.selenium.devtools.v127.network.Network;
-import org.openqa.selenium.devtools.v127.network.model.Headers;
+import org.openqa.selenium.devtools.v125.browser.Browser;
+import org.openqa.selenium.devtools.v125.network.Network;
+import org.openqa.selenium.devtools.v125.network.model.Headers;
import org.openqa.selenium.support.ui.WebDriverWait;
public class CdpApiTest extends BaseTest {
diff --git a/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java b/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java
index 3a0dd3526c3e..e85f651508fe 100644
--- a/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java
+++ b/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java
@@ -21,10 +21,10 @@
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.HasDevTools;
import org.openqa.selenium.devtools.NetworkInterceptor;
-import org.openqa.selenium.devtools.v127.browser.Browser;
-import org.openqa.selenium.devtools.v127.network.Network;
-import org.openqa.selenium.devtools.v127.performance.Performance;
-import org.openqa.selenium.devtools.v127.performance.model.Metric;
+import org.openqa.selenium.devtools.v125.browser.Browser;
+import org.openqa.selenium.devtools.v125.network.Network;
+import org.openqa.selenium.devtools.v125.performance.Performance;
+import org.openqa.selenium.devtools.v125.performance.model.Metric;
import org.openqa.selenium.remote.http.*;
import org.openqa.selenium.support.ui.WebDriverWait;
From cfc0a3cfda9d87bb62e9a97e22caa830337b6fa0 Mon Sep 17 00:00:00 2001
From: Puja Jagani
Date: Mon, 22 Jul 2024 15:34:34 +0530
Subject: [PATCH 8/8] Update version
---
.../java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java b/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java
index a85170254d04..5ef7d3b2763d 100644
--- a/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java
+++ b/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java
@@ -27,7 +27,7 @@ public class CdpApiTest extends BaseTest {
@BeforeEach
public void createSession() {
ChromeOptions options = new ChromeOptions();
- options.setBrowserVersion("124");
+ options.setBrowserVersion("125");
driver = new ChromeDriver(options);
wait = new WebDriverWait(driver, Duration.ofSeconds(10));
}