From 811bf143d11083607cde5a64d2aff01605139121 Mon Sep 17 00:00:00 2001 From: titusfortner Date: Mon, 14 Aug 2023 17:42:51 -0400 Subject: [PATCH] [cdp] add support for CDP 116 and remove support for CDP 113 --- Rakefile | 2 +- dotnet/selenium-dotnet-version.bzl | 2 +- .../src/webdriver/DevTools/DevToolsDomains.cs | 2 +- .../V113Domains.cs => v116/V116Domains.cs} | 20 ++++---- .../V116JavaScript.cs} | 16 +++---- .../{v113/V113Log.cs => v116/V116Log.cs} | 14 +++--- .../V113Network.cs => v116/V116Network.cs} | 47 ++++++++++--------- .../V113Target.cs => v116/V116Target.cs} | 14 +++--- .../webdriver/WebDriver.csproj.prebuild.cmd | 14 +++--- .../webdriver/WebDriver.csproj.prebuild.sh | 12 ++--- .../StableChannelChromeDriver.cs | 2 +- .../common/DevTools/DevToolsConsoleTest.cs | 2 +- .../test/common/DevTools/DevToolsLogTest.cs | 2 +- .../common/DevTools/DevToolsNetworkTest.cs | 2 +- .../DevTools/DevToolsPerformanceTest.cs | 2 +- .../common/DevTools/DevToolsProfilerTest.cs | 2 +- .../common/DevTools/DevToolsSecurityTest.cs | 2 +- .../common/DevTools/DevToolsTargetTest.cs | 2 +- .../devtools/{v113 => v116}/BUILD.bazel | 2 +- .../v116CdpInfo.java} | 8 ++-- .../v116Domains.java} | 26 +++++----- .../v113Events.java => v116/v116Events.java} | 25 +++++----- .../v116Javascript.java} | 17 +++---- .../{v113/v113Log.java => v116/v116Log.java} | 15 +++--- .../v116Network.java} | 45 +++++++----------- .../v113Target.java => v116/v116Target.java} | 31 ++++++------ .../org/openqa/selenium/devtools/versions.bzl | 2 +- .../node/selenium-webdriver/BUILD.bazel | 2 +- py/BUILD.bazel | 2 +- rb/lib/selenium/devtools/BUILD.bazel | 2 +- rb/lib/selenium/devtools/version.rb | 2 +- 31 files changed, 168 insertions(+), 170 deletions(-) rename dotnet/src/webdriver/DevTools/{v113/V113Domains.cs => v116/V116Domains.cs} (79%) rename dotnet/src/webdriver/DevTools/{v113/V113JavaScript.cs => v116/V116JavaScript.cs} (94%) rename dotnet/src/webdriver/DevTools/{v113/V113Log.cs => v116/V116Log.cs} (88%) rename dotnet/src/webdriver/DevTools/{v113/V113Network.cs => v116/V116Network.cs} (91%) rename dotnet/src/webdriver/DevTools/{v113/V113Target.cs => v116/V116Target.cs} (93%) rename java/src/org/openqa/selenium/devtools/{v113 => v116}/BUILD.bazel (98%) rename java/src/org/openqa/selenium/devtools/{v113/v113CdpInfo.java => v116/v116CdpInfo.java} (86%) rename java/src/org/openqa/selenium/devtools/{v113/v113Domains.java => v116/v116Domains.java} (77%) rename java/src/org/openqa/selenium/devtools/{v113/v113Events.java => v116/v116Events.java} (86%) rename java/src/org/openqa/selenium/devtools/{v113/v113Javascript.java => v116/v116Javascript.java} (85%) rename java/src/org/openqa/selenium/devtools/{v113/v113Log.java => v116/v116Log.java} (89%) rename java/src/org/openqa/selenium/devtools/{v113/v113Network.java => v116/v116Network.java} (86%) rename java/src/org/openqa/selenium/devtools/{v113/v113Target.java => v116/v116Target.java} (83%) diff --git a/Rakefile b/Rakefile index 6e671247b26c7..cede1c68beb07 100644 --- a/Rakefile +++ b/Rakefile @@ -98,9 +98,9 @@ task '//java/test/org/openqa/selenium/environment/webserver:webserver:uber' => [ JAVA_RELEASE_TARGETS = %w[ //java/src/org/openqa/selenium/chrome:chrome.publish //java/src/org/openqa/selenium/chromium:chromium.publish - //java/src/org/openqa/selenium/devtools/v113:v113.publish //java/src/org/openqa/selenium/devtools/v114:v114.publish //java/src/org/openqa/selenium/devtools/v115:v115.publish + //java/src/org/openqa/selenium/devtools/v116:v116.publish //java/src/org/openqa/selenium/devtools/v85:v85.publish //java/src/org/openqa/selenium/edge:edge.publish //java/src/org/openqa/selenium/firefox:firefox.publish diff --git a/dotnet/selenium-dotnet-version.bzl b/dotnet/selenium-dotnet-version.bzl index 874c81c5dbf76..400c36b6f5725 100644 --- a/dotnet/selenium-dotnet-version.bzl +++ b/dotnet/selenium-dotnet-version.bzl @@ -7,9 +7,9 @@ SUPPORTED_NET_STANDARD_VERSIONS = ["netstandard2.0", "netstandard2.1", "net5.0", SUPPORTED_DEVTOOLS_VERSIONS = [ "v85", - "v113", "v114", "v115", + "v116", ] ASSEMBLY_COMPANY = "Selenium Committers" diff --git a/dotnet/src/webdriver/DevTools/DevToolsDomains.cs b/dotnet/src/webdriver/DevTools/DevToolsDomains.cs index d9cabe4b5bec6..cf2fef73e9407 100644 --- a/dotnet/src/webdriver/DevTools/DevToolsDomains.cs +++ b/dotnet/src/webdriver/DevTools/DevToolsDomains.cs @@ -37,9 +37,9 @@ public abstract class DevToolsDomains // added to this dictionary. private static readonly Dictionary SupportedDevToolsVersions = new Dictionary() { + { 116, typeof(V116.V116Domains) }, { 115, typeof(V115.V115Domains) }, { 114, typeof(V114.V114Domains) }, - { 113, typeof(V113.V113Domains) }, { 85, typeof(V85.V85Domains) } }; diff --git a/dotnet/src/webdriver/DevTools/v113/V113Domains.cs b/dotnet/src/webdriver/DevTools/v116/V116Domains.cs similarity index 79% rename from dotnet/src/webdriver/DevTools/v113/V113Domains.cs rename to dotnet/src/webdriver/DevTools/v116/V116Domains.cs index 0afba9f783444..46b10ebe98f0c 100644 --- a/dotnet/src/webdriver/DevTools/v113/V113Domains.cs +++ b/dotnet/src/webdriver/DevTools/v116/V116Domains.cs @@ -1,4 +1,4 @@ -// +// // Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information @@ -19,16 +19,16 @@ using System.Collections.Generic; using System.Text; -namespace OpenQA.Selenium.DevTools.V113 +namespace OpenQA.Selenium.DevTools.V116 { /// - /// Class containing the domain implementation for version 113 of the DevTools Protocol. + /// Class containing the domain implementation for version 116 of the DevTools Protocol. /// - public class V113Domains : DevToolsDomains + public class V116Domains : DevToolsDomains { private DevToolsSessionDomains domains; - public V113Domains(DevToolsSession session) + public V116Domains(DevToolsSession session) { this.domains = new DevToolsSessionDomains(session); } @@ -36,7 +36,7 @@ public V113Domains(DevToolsSession session) /// /// Gets the DevTools Protocol version for which this class is valid. /// - public static int DevToolsVersion => 113; + public static int DevToolsVersion => 116; /// /// Gets the version-specific domains for the DevTools session. This value must be cast to a version specific type to be at all useful. @@ -46,21 +46,21 @@ public V113Domains(DevToolsSession session) /// /// Gets the object used for manipulating network information in the browser. /// - public override DevTools.Network Network => new V113Network(domains.Network, domains.Fetch); + public override DevTools.Network Network => new V116Network(domains.Network, domains.Fetch); /// /// Gets the object used for manipulating the browser's JavaScript execution. /// - public override JavaScript JavaScript => new V113JavaScript(domains.Runtime, domains.Page); + public override JavaScript JavaScript => new V116JavaScript(domains.Runtime, domains.Page); /// /// Gets the object used for manipulating DevTools Protocol targets. /// - public override DevTools.Target Target => new V113Target(domains.Target); + public override DevTools.Target Target => new V116Target(domains.Target); /// /// Gets the object used for manipulating the browser's logs. /// - public override DevTools.Log Log => new V113Log(domains.Log); + public override DevTools.Log Log => new V116Log(domains.Log); } } diff --git a/dotnet/src/webdriver/DevTools/v113/V113JavaScript.cs b/dotnet/src/webdriver/DevTools/v116/V116JavaScript.cs similarity index 94% rename from dotnet/src/webdriver/DevTools/v113/V113JavaScript.cs rename to dotnet/src/webdriver/DevTools/v116/V116JavaScript.cs index 1edfd985e9108..8a5e08bbbef30 100644 --- a/dotnet/src/webdriver/DevTools/v113/V113JavaScript.cs +++ b/dotnet/src/webdriver/DevTools/v116/V116JavaScript.cs @@ -1,4 +1,4 @@ -// +// // Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information @@ -18,25 +18,25 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using OpenQA.Selenium.DevTools.V113.Page; -using OpenQA.Selenium.DevTools.V113.Runtime; +using OpenQA.Selenium.DevTools.V116.Page; +using OpenQA.Selenium.DevTools.V116.Runtime; -namespace OpenQA.Selenium.DevTools.V113 +namespace OpenQA.Selenium.DevTools.V116 { /// - /// Class containing the JavaScript implementation for version 113 of the DevTools Protocol. + /// Class containing the JavaScript implementation for version 116 of the DevTools Protocol. /// - public class V113JavaScript : JavaScript + public class V116JavaScript : JavaScript { private RuntimeAdapter runtime; private PageAdapter page; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The DevTools Protocol adapter for the Runtime domain. /// The DevTools Protocol adapter for the Page domain. - public V113JavaScript(RuntimeAdapter runtime, PageAdapter page) + public V116JavaScript(RuntimeAdapter runtime, PageAdapter page) { this.runtime = runtime; this.page = page; diff --git a/dotnet/src/webdriver/DevTools/v113/V113Log.cs b/dotnet/src/webdriver/DevTools/v116/V116Log.cs similarity index 88% rename from dotnet/src/webdriver/DevTools/v113/V113Log.cs rename to dotnet/src/webdriver/DevTools/v116/V116Log.cs index 9866319662ee7..0c04cc431b421 100644 --- a/dotnet/src/webdriver/DevTools/v113/V113Log.cs +++ b/dotnet/src/webdriver/DevTools/v116/V116Log.cs @@ -1,4 +1,4 @@ -// +// // Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information @@ -20,22 +20,22 @@ using System.Text; using System.Threading; using System.Threading.Tasks; -using OpenQA.Selenium.DevTools.V113.Log; +using OpenQA.Selenium.DevTools.V116.Log; -namespace OpenQA.Selenium.DevTools.V113 +namespace OpenQA.Selenium.DevTools.V116 { /// - /// Class containing the browser's log as referenced by version 113 of the DevTools Protocol. + /// Class containing the browser's log as referenced by version 116 of the DevTools Protocol. /// - public class V113Log : DevTools.Log + public class V116Log : DevTools.Log { private LogAdapter adapter; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The adapter for the Log domain. - public V113Log(LogAdapter adapter) + public V116Log(LogAdapter adapter) { this.adapter = adapter; this.adapter.EntryAdded += OnAdapterEntryAdded; diff --git a/dotnet/src/webdriver/DevTools/v113/V113Network.cs b/dotnet/src/webdriver/DevTools/v116/V116Network.cs similarity index 91% rename from dotnet/src/webdriver/DevTools/v113/V113Network.cs rename to dotnet/src/webdriver/DevTools/v116/V116Network.cs index bd44ab2051a7e..166d37df498e4 100644 --- a/dotnet/src/webdriver/DevTools/v113/V113Network.cs +++ b/dotnet/src/webdriver/DevTools/v116/V116Network.cs @@ -1,4 +1,4 @@ -// +// // Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information @@ -20,25 +20,25 @@ using System.Collections.Generic; using System.Text; using System.Threading.Tasks; -using OpenQA.Selenium.DevTools.V113.Fetch; -using OpenQA.Selenium.DevTools.V113.Network; +using OpenQA.Selenium.DevTools.V116.Fetch; +using OpenQA.Selenium.DevTools.V116.Network; -namespace OpenQA.Selenium.DevTools.V113 +namespace OpenQA.Selenium.DevTools.V116 { /// - /// Class providing functionality for manipulating network calls using version 113 of the DevTools Protocol + /// Class providing functionality for manipulating network calls using version 116 of the DevTools Protocol /// - public class V113Network : DevTools.Network + public class V116Network : DevTools.Network { private FetchAdapter fetch; private NetworkAdapter network; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The adapter for the Network domain. /// The adapter for the Fetch domain. - public V113Network(NetworkAdapter network, FetchAdapter fetch) + public V116Network(NetworkAdapter network, FetchAdapter fetch) { this.network = network; this.fetch = fetch; @@ -80,12 +80,12 @@ public override async Task DisableNetwork() /// A task that represents the asynchronous operation. public override async Task EnableFetchForAllPatterns() { - await fetch.Enable(new OpenQA.Selenium.DevTools.V113.Fetch.EnableCommandSettings() + await fetch.Enable(new OpenQA.Selenium.DevTools.V116.Fetch.EnableCommandSettings() { - Patterns = new OpenQA.Selenium.DevTools.V113.Fetch.RequestPattern[] + Patterns = new OpenQA.Selenium.DevTools.V116.Fetch.RequestPattern[] { - new OpenQA.Selenium.DevTools.V113.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Request }, - new OpenQA.Selenium.DevTools.V113.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Response } + new OpenQA.Selenium.DevTools.V116.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Request }, + new OpenQA.Selenium.DevTools.V116.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Response } }, HandleAuthRequests = true }); @@ -208,9 +208,9 @@ public override async Task ContinueWithAuth(string requestId, string userName, s await fetch.ContinueWithAuth(new ContinueWithAuthCommandSettings() { RequestId = requestId, - AuthChallengeResponse = new V113.Fetch.AuthChallengeResponse() + AuthChallengeResponse = new V116.Fetch.AuthChallengeResponse() { - Response = V113.Fetch.AuthChallengeResponseResponseValues.ProvideCredentials, + Response = V116.Fetch.AuthChallengeResponseResponseValues.ProvideCredentials, Username = userName, Password = password } @@ -227,9 +227,9 @@ public override async Task CancelAuth(string requestId) await fetch.ContinueWithAuth(new ContinueWithAuthCommandSettings() { RequestId = requestId, - AuthChallengeResponse = new OpenQA.Selenium.DevTools.V113.Fetch.AuthChallengeResponse() + AuthChallengeResponse = new OpenQA.Selenium.DevTools.V116.Fetch.AuthChallengeResponse() { - Response = V113.Fetch.AuthChallengeResponseResponseValues.CancelAuth + Response = V116.Fetch.AuthChallengeResponseResponseValues.CancelAuth } }); } @@ -245,13 +245,16 @@ public override async Task AddResponseBody(HttpResponseData responseData) if (responseData.StatusCode < 300 || responseData.StatusCode > 399) { var bodyResponse = await fetch.GetResponseBody(new Fetch.GetResponseBodyCommandSettings() { RequestId = responseData.RequestId }); - if (bodyResponse.Base64Encoded) + if (bodyResponse != null) { - responseData.Body = Encoding.UTF8.GetString(Convert.FromBase64String(bodyResponse.Body)); - } - else - { - responseData.Body = bodyResponse.Body; + if (bodyResponse.Base64Encoded) + { + responseData.Body = Encoding.UTF8.GetString(Convert.FromBase64String(bodyResponse.Body)); + } + else + { + responseData.Body = bodyResponse.Body; + } } } } diff --git a/dotnet/src/webdriver/DevTools/v113/V113Target.cs b/dotnet/src/webdriver/DevTools/v116/V116Target.cs similarity index 93% rename from dotnet/src/webdriver/DevTools/v113/V113Target.cs rename to dotnet/src/webdriver/DevTools/v116/V116Target.cs index 5c614e81bf468..d438624118a9c 100644 --- a/dotnet/src/webdriver/DevTools/v113/V113Target.cs +++ b/dotnet/src/webdriver/DevTools/v116/V116Target.cs @@ -1,4 +1,4 @@ -// +// // Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information @@ -21,22 +21,22 @@ using System.Collections.ObjectModel; using System.Text; using System.Threading.Tasks; -using OpenQA.Selenium.DevTools.V113.Target; +using OpenQA.Selenium.DevTools.V116.Target; -namespace OpenQA.Selenium.DevTools.V113 +namespace OpenQA.Selenium.DevTools.V116 { /// - /// Class providing functionality for manipulating targets for version 113 of the DevTools Protocol + /// Class providing functionality for manipulating targets for version 116 of the DevTools Protocol /// - public class V113Target : DevTools.Target + public class V116Target : DevTools.Target { private TargetAdapter adapter; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The adapter for the Target domain. - public V113Target(TargetAdapter adapter) + public V116Target(TargetAdapter adapter) { this.adapter = adapter; adapter.DetachedFromTarget += OnDetachedFromTarget; diff --git a/dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd b/dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd index a34dc049ca5b3..e6ab9d58e9205 100644 --- a/dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd +++ b/dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd @@ -27,13 +27,6 @@ if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v85\DevToolsSession popd ) -if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v113\DevToolsSessionDomains.cs" ( - echo Generating CDP code for version 113 - pushd "%1..\..\.." - bazel build //dotnet/src/webdriver/cdp:generate-v113 - popd -) - if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v114\DevToolsSessionDomains.cs" ( echo Generating CDP code for version 114 pushd "%1..\..\.." @@ -47,3 +40,10 @@ if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v115\DevToolsSessio bazel build //dotnet/src/webdriver/cdp:generate-v115 popd ) + +if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v116\DevToolsSessionDomains.cs" ( + echo Generating CDP code for version 116 + pushd "%1..\..\.." + bazel build //dotnet/src/webdriver/cdp:generate-v116 + popd +) diff --git a/dotnet/src/webdriver/WebDriver.csproj.prebuild.sh b/dotnet/src/webdriver/WebDriver.csproj.prebuild.sh index 1ada47d599a89..d59e7806c21fc 100755 --- a/dotnet/src/webdriver/WebDriver.csproj.prebuild.sh +++ b/dotnet/src/webdriver/WebDriver.csproj.prebuild.sh @@ -23,12 +23,6 @@ then bazel build //dotnet/src/webdriver/cdp:generate-v85 fi -if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v113/DevToolsSessionDomains.cs" ]] -then - echo "Generating CDP code for version 113" - bazel build //dotnet/src/webdriver/cdp:generate-v113 -fi - if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v114/DevToolsSessionDomains.cs" ]] then echo "Generating CDP code for version 114" @@ -40,3 +34,9 @@ then echo "Generating CDP code for version 115" bazel build //dotnet/src/webdriver/cdp:generate-v115 fi + +if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v116/DevToolsSessionDomains.cs" ]] +then + echo "Generating CDP code for version 116" + bazel build //dotnet/src/webdriver/cdp:generate-v116 +fi diff --git a/dotnet/test/common/CustomDriverConfigs/StableChannelChromeDriver.cs b/dotnet/test/common/CustomDriverConfigs/StableChannelChromeDriver.cs index e6fda71d92cc1..39f49d72d9db2 100644 --- a/dotnet/test/common/CustomDriverConfigs/StableChannelChromeDriver.cs +++ b/dotnet/test/common/CustomDriverConfigs/StableChannelChromeDriver.cs @@ -15,7 +15,7 @@ public StableChannelChromeDriver(ChromeOptions options) public static ChromeOptions DefaultOptions { - get { return new ChromeOptions() { AcceptInsecureCertificates = true }; } + get { return new ChromeOptions() { AcceptInsecureCertificates = true, BrowserVersion = "116" }; } } } } diff --git a/dotnet/test/common/DevTools/DevToolsConsoleTest.cs b/dotnet/test/common/DevTools/DevToolsConsoleTest.cs index 9e96934065f45..d258d64f43b30 100644 --- a/dotnet/test/common/DevTools/DevToolsConsoleTest.cs +++ b/dotnet/test/common/DevTools/DevToolsConsoleTest.cs @@ -6,7 +6,7 @@ namespace OpenQA.Selenium.DevTools { - using CurrentCdpVersion = V115; + using CurrentCdpVersion = V116; [TestFixture] public class DevToolsConsoleTest : DevToolsTestFixture diff --git a/dotnet/test/common/DevTools/DevToolsLogTest.cs b/dotnet/test/common/DevTools/DevToolsLogTest.cs index b88248df9d71d..9ca309ee8f9ef 100644 --- a/dotnet/test/common/DevTools/DevToolsLogTest.cs +++ b/dotnet/test/common/DevTools/DevToolsLogTest.cs @@ -6,7 +6,7 @@ namespace OpenQA.Selenium.DevTools { - using CurrentCdpVersion = V115; + using CurrentCdpVersion = V116; [TestFixture] public class DevToolsLogTest : DevToolsTestFixture diff --git a/dotnet/test/common/DevTools/DevToolsNetworkTest.cs b/dotnet/test/common/DevTools/DevToolsNetworkTest.cs index 8060fed0880f5..3860873d11117 100644 --- a/dotnet/test/common/DevTools/DevToolsNetworkTest.cs +++ b/dotnet/test/common/DevTools/DevToolsNetworkTest.cs @@ -6,7 +6,7 @@ namespace OpenQA.Selenium.DevTools { - using CurrentCdpVersion = V115; + using CurrentCdpVersion = V116; [TestFixture] public class DevToolsNetworkTest : DevToolsTestFixture diff --git a/dotnet/test/common/DevTools/DevToolsPerformanceTest.cs b/dotnet/test/common/DevTools/DevToolsPerformanceTest.cs index 33ea2eb1e62d9..30a611cfd9262 100644 --- a/dotnet/test/common/DevTools/DevToolsPerformanceTest.cs +++ b/dotnet/test/common/DevTools/DevToolsPerformanceTest.cs @@ -3,7 +3,7 @@ namespace OpenQA.Selenium.DevTools { - using CurrentCdpVersion = V115; + using CurrentCdpVersion = V116; [TestFixture] public class DevToolsPerformanceTest : DevToolsTestFixture diff --git a/dotnet/test/common/DevTools/DevToolsProfilerTest.cs b/dotnet/test/common/DevTools/DevToolsProfilerTest.cs index 31e1526ffc887..4a1108de64943 100644 --- a/dotnet/test/common/DevTools/DevToolsProfilerTest.cs +++ b/dotnet/test/common/DevTools/DevToolsProfilerTest.cs @@ -5,7 +5,7 @@ namespace OpenQA.Selenium.DevTools { - using CurrentCdpVersion = V115; + using CurrentCdpVersion = V116; [TestFixture] public class DevToolsProfilerTest : DevToolsTestFixture diff --git a/dotnet/test/common/DevTools/DevToolsSecurityTest.cs b/dotnet/test/common/DevTools/DevToolsSecurityTest.cs index 450cb14f0d1b0..098f72a1a9e52 100644 --- a/dotnet/test/common/DevTools/DevToolsSecurityTest.cs +++ b/dotnet/test/common/DevTools/DevToolsSecurityTest.cs @@ -6,7 +6,7 @@ namespace OpenQA.Selenium.DevTools { - using CurrentCdpVersion = V115; + using CurrentCdpVersion = V116; [TestFixture] public class DevToolsSecurityTest : DevToolsTestFixture diff --git a/dotnet/test/common/DevTools/DevToolsTargetTest.cs b/dotnet/test/common/DevTools/DevToolsTargetTest.cs index b9e5be760b515..c885c3a0ab624 100644 --- a/dotnet/test/common/DevTools/DevToolsTargetTest.cs +++ b/dotnet/test/common/DevTools/DevToolsTargetTest.cs @@ -6,7 +6,7 @@ namespace OpenQA.Selenium.DevTools { - using CurrentCdpVersion = V115; + using CurrentCdpVersion = V116; [TestFixture] public class DevToolsTargetTest : DevToolsTestFixture diff --git a/java/src/org/openqa/selenium/devtools/v113/BUILD.bazel b/java/src/org/openqa/selenium/devtools/v116/BUILD.bazel similarity index 98% rename from java/src/org/openqa/selenium/devtools/v113/BUILD.bazel rename to java/src/org/openqa/selenium/devtools/v116/BUILD.bazel index e3db2d90e1fc5..c1a320ade7d10 100644 --- a/java/src/org/openqa/selenium/devtools/v113/BUILD.bazel +++ b/java/src/org/openqa/selenium/devtools/v116/BUILD.bazel @@ -3,7 +3,7 @@ load("//common:defs.bzl", "copy_file") load("//java:defs.bzl", "java_export", "java_library") load("//java:version.bzl", "SE_VERSION") -cdp_version = "v113" +cdp_version = "v116" java_export( name = cdp_version, diff --git a/java/src/org/openqa/selenium/devtools/v113/v113CdpInfo.java b/java/src/org/openqa/selenium/devtools/v116/v116CdpInfo.java similarity index 86% rename from java/src/org/openqa/selenium/devtools/v113/v113CdpInfo.java rename to java/src/org/openqa/selenium/devtools/v116/v116CdpInfo.java index 9a6f135195ac8..8b948c505e077 100644 --- a/java/src/org/openqa/selenium/devtools/v113/v113CdpInfo.java +++ b/java/src/org/openqa/selenium/devtools/v116/v116CdpInfo.java @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -package org.openqa.selenium.devtools.v113; +package org.openqa.selenium.devtools.v116; import com.google.auto.service.AutoService; import org.openqa.selenium.devtools.CdpInfo; @AutoService(CdpInfo.class) -public class v113CdpInfo extends CdpInfo { +public class v116CdpInfo extends CdpInfo { - public v113CdpInfo() { - super(113, v113Domains::new); + public v116CdpInfo() { + super(116, v116Domains::new); } } diff --git a/java/src/org/openqa/selenium/devtools/v113/v113Domains.java b/java/src/org/openqa/selenium/devtools/v116/v116Domains.java similarity index 77% rename from java/src/org/openqa/selenium/devtools/v113/v113Domains.java rename to java/src/org/openqa/selenium/devtools/v116/v116Domains.java index 92381fdc7f96b..43db86ac21e46 100644 --- a/java/src/org/openqa/selenium/devtools/v113/v113Domains.java +++ b/java/src/org/openqa/selenium/devtools/v116/v116Domains.java @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -package org.openqa.selenium.devtools.v113; +package org.openqa.selenium.devtools.v116; import org.openqa.selenium.devtools.DevTools; import org.openqa.selenium.devtools.idealized.Domains; @@ -26,21 +26,21 @@ import org.openqa.selenium.devtools.idealized.target.Target; import org.openqa.selenium.internal.Require; -public class v113Domains implements Domains { +public class v116Domains implements Domains { - private final v113Javascript js; - private final v113Events events; - private final v113Log log; - private final v113Network network; - private final v113Target target; + private final v116Javascript js; + private final v116Events events; + private final v116Log log; + private final v116Network network; + private final v116Target target; - public v113Domains(DevTools devtools) { + public v116Domains(DevTools devtools) { Require.nonNull("DevTools", devtools); - events = new v113Events(devtools); - js = new v113Javascript(devtools); - log = new v113Log(); - network = new v113Network(devtools); - target = new v113Target(); + events = new v116Events(devtools); + js = new v116Javascript(devtools); + log = new v116Log(); + network = new v116Network(devtools); + target = new v116Target(); } @Override diff --git a/java/src/org/openqa/selenium/devtools/v113/v113Events.java b/java/src/org/openqa/selenium/devtools/v116/v116Events.java similarity index 86% rename from java/src/org/openqa/selenium/devtools/v113/v113Events.java rename to java/src/org/openqa/selenium/devtools/v116/v116Events.java index 9e1dde53d885b..ff3636b0d06d1 100644 --- a/java/src/org/openqa/selenium/devtools/v113/v113Events.java +++ b/java/src/org/openqa/selenium/devtools/v116/v116Events.java @@ -15,12 +15,9 @@ // specific language governing permissions and limitations // under the License. -package org.openqa.selenium.devtools.v113; +package org.openqa.selenium.devtools.v116; import com.google.common.collect.ImmutableList; -import java.time.Instant; -import java.util.List; -import java.util.Optional; import org.openqa.selenium.JavascriptException; import org.openqa.selenium.devtools.Command; import org.openqa.selenium.devtools.DevTools; @@ -28,15 +25,19 @@ import org.openqa.selenium.devtools.events.ConsoleEvent; import org.openqa.selenium.devtools.idealized.Events; import org.openqa.selenium.devtools.idealized.runtime.model.RemoteObject; -import org.openqa.selenium.devtools.v113.runtime.Runtime; -import org.openqa.selenium.devtools.v113.runtime.model.ConsoleAPICalled; -import org.openqa.selenium.devtools.v113.runtime.model.ExceptionDetails; -import org.openqa.selenium.devtools.v113.runtime.model.ExceptionThrown; -import org.openqa.selenium.devtools.v113.runtime.model.StackTrace; +import org.openqa.selenium.devtools.v116.runtime.Runtime; +import org.openqa.selenium.devtools.v116.runtime.model.ConsoleAPICalled; +import org.openqa.selenium.devtools.v116.runtime.model.ExceptionDetails; +import org.openqa.selenium.devtools.v116.runtime.model.ExceptionThrown; +import org.openqa.selenium.devtools.v116.runtime.model.StackTrace; + +import java.time.Instant; +import java.util.List; +import java.util.Optional; -public class v113Events extends Events { +public class v116Events extends Events { - public v113Events(DevTools devtools) { + public v116Events(DevTools devtools) { super(devtools); } @@ -77,7 +78,7 @@ protected ConsoleEvent toConsoleEvent(ConsoleAPICalled event) { protected JavascriptException toJsException(ExceptionThrown event) { ExceptionDetails details = event.getExceptionDetails(); Optional maybeTrace = details.getStackTrace(); - Optional maybeException = + Optional maybeException = details.getException(); String message = diff --git a/java/src/org/openqa/selenium/devtools/v113/v113Javascript.java b/java/src/org/openqa/selenium/devtools/v116/v116Javascript.java similarity index 85% rename from java/src/org/openqa/selenium/devtools/v113/v113Javascript.java rename to java/src/org/openqa/selenium/devtools/v116/v116Javascript.java index c8d1a59d2e27a..fa6dc7e80eb79 100644 --- a/java/src/org/openqa/selenium/devtools/v113/v113Javascript.java +++ b/java/src/org/openqa/selenium/devtools/v116/v116Javascript.java @@ -15,21 +15,22 @@ // specific language governing permissions and limitations // under the License. -package org.openqa.selenium.devtools.v113; +package org.openqa.selenium.devtools.v116; -import java.util.Optional; import org.openqa.selenium.devtools.Command; import org.openqa.selenium.devtools.DevTools; import org.openqa.selenium.devtools.Event; import org.openqa.selenium.devtools.idealized.Javascript; -import org.openqa.selenium.devtools.v113.page.Page; -import org.openqa.selenium.devtools.v113.page.model.ScriptIdentifier; -import org.openqa.selenium.devtools.v113.runtime.Runtime; -import org.openqa.selenium.devtools.v113.runtime.model.BindingCalled; +import org.openqa.selenium.devtools.v116.page.Page; +import org.openqa.selenium.devtools.v116.page.model.ScriptIdentifier; +import org.openqa.selenium.devtools.v116.runtime.Runtime; +import org.openqa.selenium.devtools.v116.runtime.model.BindingCalled; + +import java.util.Optional; -public class v113Javascript extends Javascript { +public class v116Javascript extends Javascript { - public v113Javascript(DevTools devtools) { + public v116Javascript(DevTools devtools) { super(devtools); } diff --git a/java/src/org/openqa/selenium/devtools/v113/v113Log.java b/java/src/org/openqa/selenium/devtools/v116/v116Log.java similarity index 89% rename from java/src/org/openqa/selenium/devtools/v113/v113Log.java rename to java/src/org/openqa/selenium/devtools/v116/v116Log.java index c754b5777a8c5..c1d6246691951 100644 --- a/java/src/org/openqa/selenium/devtools/v113/v113Log.java +++ b/java/src/org/openqa/selenium/devtools/v116/v116Log.java @@ -15,19 +15,20 @@ // specific language governing permissions and limitations // under the License. -package org.openqa.selenium.devtools.v113; +package org.openqa.selenium.devtools.v116; -import java.util.function.Function; -import java.util.logging.Level; import org.openqa.selenium.devtools.Command; import org.openqa.selenium.devtools.ConverterFunctions; import org.openqa.selenium.devtools.Event; -import org.openqa.selenium.devtools.v113.log.Log; -import org.openqa.selenium.devtools.v113.log.model.LogEntry; -import org.openqa.selenium.devtools.v113.runtime.model.Timestamp; +import org.openqa.selenium.devtools.v116.log.Log; +import org.openqa.selenium.devtools.v116.log.model.LogEntry; +import org.openqa.selenium.devtools.v116.runtime.model.Timestamp; import org.openqa.selenium.json.JsonInput; -public class v113Log implements org.openqa.selenium.devtools.idealized.log.Log { +import java.util.function.Function; +import java.util.logging.Level; + +public class v116Log implements org.openqa.selenium.devtools.idealized.log.Log { @Override public Command enable() { diff --git a/java/src/org/openqa/selenium/devtools/v113/v113Network.java b/java/src/org/openqa/selenium/devtools/v116/v116Network.java similarity index 86% rename from java/src/org/openqa/selenium/devtools/v113/v113Network.java rename to java/src/org/openqa/selenium/devtools/v116/v116Network.java index cbb57f980e0a6..c6b19195c5297 100644 --- a/java/src/org/openqa/selenium/devtools/v113/v113Network.java +++ b/java/src/org/openqa/selenium/devtools/v116/v116Network.java @@ -15,62 +15,53 @@ // specific language governing permissions and limitations // under the License. -package org.openqa.selenium.devtools.v113; - -import static java.net.HttpURLConnection.HTTP_OK; +package org.openqa.selenium.devtools.v116; import com.google.common.collect.ImmutableList; import com.google.common.io.ByteStreams; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.AbstractMap; -import java.util.Base64; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.logging.Logger; import org.openqa.selenium.UsernameAndPassword; import org.openqa.selenium.devtools.Command; import org.openqa.selenium.devtools.DevTools; import org.openqa.selenium.devtools.DevToolsException; import org.openqa.selenium.devtools.Event; import org.openqa.selenium.devtools.idealized.Network; -import org.openqa.selenium.devtools.v113.fetch.Fetch; -import org.openqa.selenium.devtools.v113.fetch.model.AuthChallengeResponse; -import org.openqa.selenium.devtools.v113.fetch.model.AuthRequired; -import org.openqa.selenium.devtools.v113.fetch.model.HeaderEntry; -import org.openqa.selenium.devtools.v113.fetch.model.RequestPattern; -import org.openqa.selenium.devtools.v113.fetch.model.RequestPaused; -import org.openqa.selenium.devtools.v113.fetch.model.RequestStage; -import org.openqa.selenium.devtools.v113.network.model.Request; +import org.openqa.selenium.devtools.v116.fetch.Fetch; +import org.openqa.selenium.devtools.v116.fetch.model.*; +import org.openqa.selenium.devtools.v116.network.model.Request; import org.openqa.selenium.internal.Either; import org.openqa.selenium.remote.http.HttpRequest; import org.openqa.selenium.remote.http.HttpResponse; -public class v113Network extends Network { +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.*; +import java.util.logging.Logger; + +import static java.net.HttpURLConnection.HTTP_OK; + +public class v116Network extends Network { - private static final Logger LOG = Logger.getLogger(v113Network.class.getName()); + private static final Logger LOG = Logger.getLogger(v116Network.class.getName()); - public v113Network(DevTools devTools) { + public v116Network(DevTools devTools) { super(devTools); } @Override protected Command setUserAgentOverride(UserAgent userAgent) { - return org.openqa.selenium.devtools.v113.network.Network.setUserAgentOverride( + return org.openqa.selenium.devtools.v116.network.Network.setUserAgentOverride( userAgent.userAgent(), userAgent.acceptLanguage(), userAgent.platform(), Optional.empty()); } @Override protected Command enableNetworkCaching() { - return org.openqa.selenium.devtools.v113.network.Network.setCacheDisabled(false); + return org.openqa.selenium.devtools.v116.network.Network.setCacheDisabled(false); } @Override protected Command disableNetworkCaching() { - return org.openqa.selenium.devtools.v113.network.Network.setCacheDisabled(true); + return org.openqa.selenium.devtools.v116.network.Network.setCacheDisabled(true); } @Override diff --git a/java/src/org/openqa/selenium/devtools/v113/v113Target.java b/java/src/org/openqa/selenium/devtools/v116/v116Target.java similarity index 83% rename from java/src/org/openqa/selenium/devtools/v113/v113Target.java rename to java/src/org/openqa/selenium/devtools/v116/v116Target.java index 8d03ff6535652..810dbd42dc6c7 100644 --- a/java/src/org/openqa/selenium/devtools/v113/v113Target.java +++ b/java/src/org/openqa/selenium/devtools/v116/v116Target.java @@ -15,34 +15,35 @@ // specific language governing permissions and limitations // under the License. -package org.openqa.selenium.devtools.v113; +package org.openqa.selenium.devtools.v116; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import java.util.List; -import java.util.Optional; -import java.util.function.Function; import org.openqa.selenium.devtools.Command; import org.openqa.selenium.devtools.ConverterFunctions; import org.openqa.selenium.devtools.Event; import org.openqa.selenium.devtools.idealized.browser.model.BrowserContextID; import org.openqa.selenium.devtools.idealized.target.model.SessionID; import org.openqa.selenium.devtools.idealized.target.model.TargetID; -import org.openqa.selenium.devtools.v113.target.Target; -import org.openqa.selenium.devtools.v113.target.model.TargetInfo; +import org.openqa.selenium.devtools.v116.target.Target; +import org.openqa.selenium.devtools.v116.target.model.TargetInfo; import org.openqa.selenium.json.JsonInput; import org.openqa.selenium.json.TypeToken; -public class v113Target implements org.openqa.selenium.devtools.idealized.target.Target { +import java.util.List; +import java.util.Optional; +import java.util.function.Function; + +public class v116Target implements org.openqa.selenium.devtools.idealized.target.Target { @Override public Command detachFromTarget( Optional sessionId, Optional targetId) { return Target.detachFromTarget( sessionId.map( - id -> new org.openqa.selenium.devtools.v113.target.model.SessionID(id.toString())), + id -> new org.openqa.selenium.devtools.v116.target.model.SessionID(id.toString())), targetId.map( - id -> new org.openqa.selenium.devtools.v113.target.model.TargetID(id.toString()))); + id -> new org.openqa.selenium.devtools.v116.target.model.TargetID(id.toString()))); } @Override @@ -74,19 +75,19 @@ public Command detachFromTarget( @Override public Command attachToTarget(TargetID targetId) { - Function mapper = + Function mapper = ConverterFunctions.map( - "sessionId", org.openqa.selenium.devtools.v113.target.model.SessionID.class); + "sessionId", org.openqa.selenium.devtools.v116.target.model.SessionID.class); return new Command<>( "Target.attachToTarget", ImmutableMap.of( "targetId", - new org.openqa.selenium.devtools.v113.target.model.TargetID(targetId.toString()), + new org.openqa.selenium.devtools.v116.target.model.TargetID(targetId.toString()), "flatten", true), input -> { - org.openqa.selenium.devtools.v113.target.model.SessionID id = mapper.apply(input); + org.openqa.selenium.devtools.v116.target.model.SessionID id = mapper.apply(input); return new SessionID(id.toString()); }); } @@ -101,9 +102,9 @@ public Event detached() { return new Event<>( "Target.detachedFromTarget", input -> { - Function converter = + Function converter = ConverterFunctions.map( - "targetId", org.openqa.selenium.devtools.v113.target.model.TargetID.class); + "targetId", org.openqa.selenium.devtools.v116.target.model.TargetID.class); return new TargetID(converter.apply(input).toString()); }); } diff --git a/java/src/org/openqa/selenium/devtools/versions.bzl b/java/src/org/openqa/selenium/devtools/versions.bzl index c2ce294c8c4e0..8e5a7ddf24968 100644 --- a/java/src/org/openqa/selenium/devtools/versions.bzl +++ b/java/src/org/openqa/selenium/devtools/versions.bzl @@ -1,8 +1,8 @@ CDP_VERSIONS = [ "v85", # Required by Firefox - "v113", "v114", "v115", + "v116", ] CDP_DEPS = ["//java/src/org/openqa/selenium/devtools/%s" % v for v in CDP_VERSIONS] diff --git a/javascript/node/selenium-webdriver/BUILD.bazel b/javascript/node/selenium-webdriver/BUILD.bazel index c57eb219ca392..74482665b68fc 100644 --- a/javascript/node/selenium-webdriver/BUILD.bazel +++ b/javascript/node/selenium-webdriver/BUILD.bazel @@ -4,9 +4,9 @@ load("//common:defs.bzl", "copy_file") BROWSER_VERSIONS = [ "v85", - "v113", "v114", "v115", + "v116", ] SRC_FILES = [ diff --git a/py/BUILD.bazel b/py/BUILD.bazel index e92a5e2b9252b..a319676391691 100644 --- a/py/BUILD.bazel +++ b/py/BUILD.bazel @@ -20,9 +20,9 @@ SE_VERSION = "4.11.2" BROWSER_VERSIONS = [ "v85", - "v113", "v114", "v115", + "v116", ] TEST_DEPS = [ diff --git a/rb/lib/selenium/devtools/BUILD.bazel b/rb/lib/selenium/devtools/BUILD.bazel index 4ee648f1ad060..8f5d7394d9e18 100644 --- a/rb/lib/selenium/devtools/BUILD.bazel +++ b/rb/lib/selenium/devtools/BUILD.bazel @@ -4,9 +4,9 @@ package(default_visibility = ["//rb:__subpackages__"]) CDP_VERSIONS = [ "v85", - "v113", "v114", "v115", + "v116", ] rb_library( diff --git a/rb/lib/selenium/devtools/version.rb b/rb/lib/selenium/devtools/version.rb index 9305b2c28c93b..f60e9e9ade485 100644 --- a/rb/lib/selenium/devtools/version.rb +++ b/rb/lib/selenium/devtools/version.rb @@ -19,6 +19,6 @@ module Selenium module DevTools - VERSION = '0.115.0' + VERSION = '0.116.0' end # DevTools end # Selenium