diff --git a/dotnet/CHANGELOG b/dotnet/CHANGELOG index 530a68390a5cb..e56c8878cd3d4 100644 --- a/dotnet/CHANGELOG +++ b/dotnet/CHANGELOG @@ -1,6 +1,6 @@ v4.0.0rc1 ========= - * Set available versions of Chrome DevTools Protocol to 85, 91, and 92. + * Set available versions of Chrome DevTools Protocol to 85, 92, and 93. * Enabled script pinning. This allows the user to add a snippet of JavaScript to a page that will be available on all subsquent pages, and not have to pass the script across the wire every time. For exceptionally large blobs diff --git a/dotnet/selenium-dotnet-version.bzl b/dotnet/selenium-dotnet-version.bzl index 82c2162a7ca79..544b78ed43565 100644 --- a/dotnet/selenium-dotnet-version.bzl +++ b/dotnet/selenium-dotnet-version.bzl @@ -7,8 +7,8 @@ SUPPORTED_NET_STANDARD_VERSIONS = ["netstandard2.0", "netstandard2.1", "net5.0"] SUPPORTED_DEVTOOLS_VERSIONS = [ "v85", - "v91", "v92", + "v93", ] ASSEMBLY_COMPANY = "Selenium Committers" diff --git a/dotnet/src/webdriver/DevTools/DevToolsDomains.cs b/dotnet/src/webdriver/DevTools/DevToolsDomains.cs index cd8a5442eba52..305b7ee4ccfbe 100644 --- a/dotnet/src/webdriver/DevTools/DevToolsDomains.cs +++ b/dotnet/src/webdriver/DevTools/DevToolsDomains.cs @@ -37,8 +37,8 @@ public abstract class DevToolsDomains // added to this dictionary. private static readonly Dictionary SupportedDevToolsVersions = new Dictionary() { + { 93, typeof(V93.V93Domains) }, { 92, typeof(V92.V92Domains) }, - { 91, typeof(V91.V91Domains) }, { 85, typeof(V85.V85Domains) } }; diff --git a/dotnet/src/webdriver/DevTools/v91/V91Domains.cs b/dotnet/src/webdriver/DevTools/v93/V93Domains.cs similarity index 82% rename from dotnet/src/webdriver/DevTools/v91/V91Domains.cs rename to dotnet/src/webdriver/DevTools/v93/V93Domains.cs index ee9b9d18d4a53..f9f73dd98d87b 100644 --- a/dotnet/src/webdriver/DevTools/v91/V91Domains.cs +++ b/dotnet/src/webdriver/DevTools/v93/V93Domains.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.V91 +namespace OpenQA.Selenium.DevTools.V93 { /// /// Class containing the domain implementation for version 90 of the DevTools Protocol. /// - public class V91Domains : DevToolsDomains + public class V93Domains : DevToolsDomains { private DevToolsSessionDomains domains; - public V91Domains(DevToolsSession session) + public V93Domains(DevToolsSession session) { this.domains = new DevToolsSessionDomains(session); } @@ -46,21 +46,21 @@ public V91Domains(DevToolsSession session) /// /// Gets the object used for manipulating network information in the browser. /// - public override DevTools.Network Network => new V91Network(domains.Network, domains.Fetch); + public override DevTools.Network Network => new V93Network(domains.Network, domains.Fetch); /// /// Gets the object used for manipulating the browser's JavaScript execution. /// - public override JavaScript JavaScript => new V91JavaScript(domains.Runtime, domains.Page); + public override JavaScript JavaScript => new V93JavaScript(domains.Runtime, domains.Page); /// /// Gets the object used for manipulating DevTools Protocol targets. /// - public override DevTools.Target Target => new V91Target(domains.Target); + public override DevTools.Target Target => new V93Target(domains.Target); /// /// Gets the object used for manipulating the browser's logs. /// - public override DevTools.Log Log => new V91Log(domains.Log); + public override DevTools.Log Log => new V93Log(domains.Log); } } diff --git a/dotnet/src/webdriver/DevTools/v91/V91JavaScript.cs b/dotnet/src/webdriver/DevTools/v93/V93JavaScript.cs similarity index 95% rename from dotnet/src/webdriver/DevTools/v91/V91JavaScript.cs rename to dotnet/src/webdriver/DevTools/v93/V93JavaScript.cs index c55aa5686049e..c618281b0bdd4 100644 --- a/dotnet/src/webdriver/DevTools/v91/V91JavaScript.cs +++ b/dotnet/src/webdriver/DevTools/v93/V93JavaScript.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.V91.Page; -using OpenQA.Selenium.DevTools.V91.Runtime; +using OpenQA.Selenium.DevTools.V93.Page; +using OpenQA.Selenium.DevTools.V93.Runtime; -namespace OpenQA.Selenium.DevTools.V91 +namespace OpenQA.Selenium.DevTools.V93 { /// /// Class containing the JavaScript implementation for version 89 of the DevTools Protocol. /// - public class V91JavaScript : JavaScript + public class V93JavaScript : 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 V91JavaScript(RuntimeAdapter runtime, PageAdapter page) + public V93JavaScript(RuntimeAdapter runtime, PageAdapter page) { this.runtime = runtime; this.page = page; diff --git a/dotnet/src/webdriver/DevTools/v91/V91Log.cs b/dotnet/src/webdriver/DevTools/v93/V93Log.cs similarity index 90% rename from dotnet/src/webdriver/DevTools/v91/V91Log.cs rename to dotnet/src/webdriver/DevTools/v93/V93Log.cs index 0b8422a40408f..edf0b56a713f8 100644 --- a/dotnet/src/webdriver/DevTools/v91/V91Log.cs +++ b/dotnet/src/webdriver/DevTools/v93/V93Log.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.V91.Log; +using OpenQA.Selenium.DevTools.V93.Log; -namespace OpenQA.Selenium.DevTools.V91 +namespace OpenQA.Selenium.DevTools.V93 { /// /// Class containing the browser's log as referenced by version 89 of the DevTools Protocol. /// - public class V91Log : DevTools.Log + public class V93Log : 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 V91Log(LogAdapter adapter) + public V93Log(LogAdapter adapter) { this.adapter = adapter; this.adapter.EntryAdded += OnAdapterEntryAdded; diff --git a/dotnet/src/webdriver/DevTools/v91/V91Network.cs b/dotnet/src/webdriver/DevTools/v93/V93Network.cs similarity index 93% rename from dotnet/src/webdriver/DevTools/v91/V91Network.cs rename to dotnet/src/webdriver/DevTools/v93/V93Network.cs index 33f6ca1109bf3..0c23e875ffa3e 100644 --- a/dotnet/src/webdriver/DevTools/v91/V91Network.cs +++ b/dotnet/src/webdriver/DevTools/v93/V93Network.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.V91.Fetch; -using OpenQA.Selenium.DevTools.V91.Network; +using OpenQA.Selenium.DevTools.V93.Fetch; +using OpenQA.Selenium.DevTools.V93.Network; -namespace OpenQA.Selenium.DevTools.V91 +namespace OpenQA.Selenium.DevTools.V93 { /// /// Class providing functionality for manipulating network calls using version 89 of the DevTools Protocol /// - public class V91Network : DevTools.Network + public class V93Network : 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 V91Network(NetworkAdapter network, FetchAdapter fetch) + public V93Network(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.V91.Fetch.EnableCommandSettings() + await fetch.Enable(new OpenQA.Selenium.DevTools.V93.Fetch.EnableCommandSettings() { - Patterns = new OpenQA.Selenium.DevTools.V91.Fetch.RequestPattern[] + Patterns = new OpenQA.Selenium.DevTools.V93.Fetch.RequestPattern[] { - new OpenQA.Selenium.DevTools.V91.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Request }, - new OpenQA.Selenium.DevTools.V91.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Response } + new OpenQA.Selenium.DevTools.V93.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Request }, + new OpenQA.Selenium.DevTools.V93.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Response } }, HandleAuthRequests = true }); @@ -193,9 +193,9 @@ public override async Task ContinueWithAuth(string requestId, string userName, s await fetch.ContinueWithAuth(new ContinueWithAuthCommandSettings() { RequestId = requestId, - AuthChallengeResponse = new V91.Fetch.AuthChallengeResponse() + AuthChallengeResponse = new V93.Fetch.AuthChallengeResponse() { - Response = V91.Fetch.AuthChallengeResponseResponseValues.ProvideCredentials, + Response = V93.Fetch.AuthChallengeResponseResponseValues.ProvideCredentials, Username = userName, Password = password } @@ -212,9 +212,9 @@ public override async Task CancelAuth(string requestId) await fetch.ContinueWithAuth(new ContinueWithAuthCommandSettings() { RequestId = requestId, - AuthChallengeResponse = new OpenQA.Selenium.DevTools.V91.Fetch.AuthChallengeResponse() + AuthChallengeResponse = new OpenQA.Selenium.DevTools.V93.Fetch.AuthChallengeResponse() { - Response = V91.Fetch.AuthChallengeResponseResponseValues.CancelAuth + Response = V93.Fetch.AuthChallengeResponseResponseValues.CancelAuth } }); } diff --git a/dotnet/src/webdriver/DevTools/v91/V91Target.cs b/dotnet/src/webdriver/DevTools/v93/V93Target.cs similarity index 93% rename from dotnet/src/webdriver/DevTools/v91/V91Target.cs rename to dotnet/src/webdriver/DevTools/v93/V93Target.cs index 4a61c2a7eaa68..782ab21767ac1 100644 --- a/dotnet/src/webdriver/DevTools/v91/V91Target.cs +++ b/dotnet/src/webdriver/DevTools/v93/V93Target.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.V91.Target; +using OpenQA.Selenium.DevTools.V93.Target; -namespace OpenQA.Selenium.DevTools.V91 +namespace OpenQA.Selenium.DevTools.V93 { /// /// Class providing functionality for manipulating targets for version 89 of the DevTools Protocol /// - public class V91Target : DevTools.Target + public class V93Target : 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 V91Target(TargetAdapter adapter) + public V93Target(TargetAdapter adapter) { this.adapter = adapter; } diff --git a/dotnet/src/webdriver/Remote/DriverServiceCommandExecutor.cs b/dotnet/src/webdriver/Remote/DriverServiceCommandExecutor.cs index 49a2acbe2d1e7..37b49c3a85f95 100644 --- a/dotnet/src/webdriver/Remote/DriverServiceCommandExecutor.cs +++ b/dotnet/src/webdriver/Remote/DriverServiceCommandExecutor.cs @@ -141,6 +141,7 @@ protected virtual void Dispose(bool disposing) { if (disposing) { + this.internalExecutor.Dispose(); this.service.Dispose(); } diff --git a/dotnet/src/webdriver/WebDriver.cs b/dotnet/src/webdriver/WebDriver.cs index f94d49d55a484..d399c8cfce7d1 100644 --- a/dotnet/src/webdriver/WebDriver.cs +++ b/dotnet/src/webdriver/WebDriver.cs @@ -712,6 +712,8 @@ protected virtual void Dispose(bool disposing) { this.sessionId = null; } + + this.executor.Dispose(); } private static void UnpackAndThrowOnError(Response errorResponse) diff --git a/dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd b/dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd index 58f6a2cdff81a..84922761cac93 100644 --- a/dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd +++ b/dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd @@ -27,16 +27,16 @@ if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v85\DevToolsSession popd ) -if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v91\DevToolsSessionDomains.cs" ( - echo Generating CDP code for version 91 +if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v92\DevToolsSessionDomains.cs" ( + echo Generating CDP code for version 92 pushd "%1..\..\.." - bazel build //dotnet/src/webdriver/cdp:generate-v91 + bazel build //dotnet/src/webdriver/cdp:generate-v92 popd ) -if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v92\DevToolsSessionDomains.cs" ( - echo Generating CDP code for version 92 +if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v93\DevToolsSessionDomains.cs" ( + echo Generating CDP code for version 93 pushd "%1..\..\.." - bazel build //dotnet/src/webdriver/cdp:generate-v92 + bazel build //dotnet/src/webdriver/cdp:generate-v93 popd ) diff --git a/dotnet/src/webdriver/WebDriver.csproj.prebuild.sh b/dotnet/src/webdriver/WebDriver.csproj.prebuild.sh index c4ab48535dc4e..9c06522d7a706 100644 --- a/dotnet/src/webdriver/WebDriver.csproj.prebuild.sh +++ b/dotnet/src/webdriver/WebDriver.csproj.prebuild.sh @@ -23,14 +23,14 @@ then bazel build //dotnet/src/webdriver/cdp:generate-v85 fi -if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v91/DevToolsSessionDomains.cs" ]] -then - echo "Generating CDP code for version 91" - bazel build //dotnet/src/webdriver/cdp:generate-v91 -fi - if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v92/DevToolsSessionDomains.cs" ]] then echo "Generating CDP code for version 92" bazel build //dotnet/src/webdriver/cdp:generate-v92 fi + +if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v93/DevToolsSessionDomains.cs" ]] +then + echo "Generating CDP code for version 93" + bazel build //dotnet/src/webdriver/cdp:generate-v93 +fi