From 10520da99f7b596cb54e00d174e1c3155d472c54 Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko <22616990+nvborisenko@users.noreply.github.com> Date: Thu, 9 Apr 2026 21:06:35 +0300 Subject: [PATCH 1/3] [dotnet] Hide obsoleted chromium static fields --- .../src/webdriver/Chromium/ChromiumDriver.cs | 48 ++++++------------- 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a/dotnet/src/webdriver/Chromium/ChromiumDriver.cs b/dotnet/src/webdriver/Chromium/ChromiumDriver.cs index 2372d947af06b..522f425ba4d91 100644 --- a/dotnet/src/webdriver/Chromium/ChromiumDriver.cs +++ b/dotnet/src/webdriver/Chromium/ChromiumDriver.cs @@ -22,8 +22,6 @@ using OpenQA.Selenium.DevTools; using OpenQA.Selenium.Remote; -#pragma warning disable CS0618 // Obsolete members are used internally - namespace OpenQA.Selenium.Chromium; /// @@ -34,93 +32,77 @@ public class ChromiumDriver : WebDriver, ISupportsLogs, IDevTools /// /// Accept untrusted SSL Certificates /// - [Obsolete("This field will be made protected in v4.44.")] - // When make it protected don't forget to remove pragma warning disable CS0618 and the Obsolete attribute from this field. - public static readonly bool AcceptUntrustedCertificates = true; + protected static readonly bool AcceptUntrustedCertificates = true; /// /// Command for executing a Chrome DevTools Protocol command in a driver for a Chromium-based browser. /// - [Obsolete("This field will be made protected in v4.44.")] - public static readonly string ExecuteCdp = "executeCdpCommand"; + protected static readonly string ExecuteCdp = "executeCdpCommand"; /// /// Command for getting cast sinks in a driver for a Chromium-based browser. /// - [Obsolete("This field will be made protected in v4.44.")] - public static readonly string GetCastSinksCommand = "getCastSinks"; + protected static readonly string GetCastSinksCommand = "getCastSinks"; /// /// Command for selecting a cast sink in a driver for a Chromium-based browser. /// - [Obsolete("This field will be made protected in v4.44.")] - public static readonly string SelectCastSinkCommand = "selectCastSink"; + protected static readonly string SelectCastSinkCommand = "selectCastSink"; /// /// Command for starting cast tab mirroring in a driver for a Chromium-based browser. /// - [Obsolete("This field will be made protected in v4.44.")] - public static readonly string StartCastTabMirroringCommand = "startCastTabMirroring"; + protected static readonly string StartCastTabMirroringCommand = "startCastTabMirroring"; /// /// Command for starting cast desktop mirroring in a driver for a Chromium-based browser. /// - [Obsolete("This field will be made protected in v4.44.")] - public static readonly string StartCastDesktopMirroringCommand = "startCastDesktopMirroring"; + protected static readonly string StartCastDesktopMirroringCommand = "startCastDesktopMirroring"; /// /// Command for getting a cast issued message in a driver for a Chromium-based browser. /// - [Obsolete("This field will be made protected in v4.44.")] - public static readonly string GetCastIssueMessageCommand = "getCastIssueMessage"; + protected static readonly string GetCastIssueMessageCommand = "getCastIssueMessage"; /// /// Command for stopping casting in a driver for a Chromium-based browser. /// - [Obsolete("This field will be made protected in v4.44.")] - public static readonly string StopCastingCommand = "stopCasting"; + protected static readonly string StopCastingCommand = "stopCasting"; /// /// Command for getting the simulated network conditions in a driver for a Chromium-based browser. /// - [Obsolete("This field will be made protected in v4.44.")] - public static readonly string GetNetworkConditionsCommand = "getNetworkConditions"; + protected static readonly string GetNetworkConditionsCommand = "getNetworkConditions"; /// /// Command for setting the simulated network conditions in a driver for a Chromium-based browser. /// - [Obsolete("This field will be made protected in v4.44.")] - public static readonly string SetNetworkConditionsCommand = "setNetworkConditions"; + protected static readonly string SetNetworkConditionsCommand = "setNetworkConditions"; /// /// Command for deleting the simulated network conditions in a driver for a Chromium-based browser. /// - [Obsolete("This field will be made protected in v4.44.")] - public static readonly string DeleteNetworkConditionsCommand = "deleteNetworkConditions"; + protected static readonly string DeleteNetworkConditionsCommand = "deleteNetworkConditions"; /// /// Command for executing a Chrome DevTools Protocol command in a driver for a Chromium-based browser. /// - [Obsolete("This field will be made protected in v4.44.")] - public static readonly string SendChromeCommand = "sendChromeCommand"; + protected static readonly string SendChromeCommand = "sendChromeCommand"; /// /// Command for executing a Chrome DevTools Protocol command that returns a result in a driver for a Chromium-based browser. /// - [Obsolete("This field will be made protected in v4.44.")] - public static readonly string SendChromeCommandWithResult = "sendChromeCommandWithResult"; + protected static readonly string SendChromeCommandWithResult = "sendChromeCommandWithResult"; /// /// Command for launching an app in a driver for a Chromium-based browser. /// - [Obsolete("This field will be made protected in v4.44.")] - public static readonly string LaunchAppCommand = "launchAppCommand"; + protected static readonly string LaunchAppCommand = "launchAppCommand"; /// /// Command for setting permissions in a driver for a Chromium-based browser. /// - [Obsolete("This field will be made protected in v4.44.")] - public static readonly string SetPermissionCommand = "setPermission"; + protected static readonly string SetPermissionCommand = "setPermission"; private readonly string optionsCapabilityName; private DevToolsSession? devToolsSession; From d760a2acc96ffce98ef2248fd79a2fa96bc5aefc Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko <22616990+nvborisenko@users.noreply.github.com> Date: Thu, 9 Apr 2026 21:37:23 +0300 Subject: [PATCH 2/3] Remove obsoleted Start method from DriverService --- dotnet/src/webdriver/DriverService.cs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/dotnet/src/webdriver/DriverService.cs b/dotnet/src/webdriver/DriverService.cs index 2906c81fe376c..6d80dceacd2ad 100644 --- a/dotnet/src/webdriver/DriverService.cs +++ b/dotnet/src/webdriver/DriverService.cs @@ -191,17 +191,6 @@ public async ValueTask DisposeAsync() GC.SuppressFinalize(this); } - /// - /// Starts the driver service if it is not already running. - /// - /// If the driver service path is specified but the driver service executable name is not. - /// If the service fails to initialize within the timeout period or exits unexpectedly. - [Obsolete("Use StartAsync(CancellationToken) instead. This method will be removed in a future release (4.43).")] - public void Start() - { - this.StartAsync().GetAwaiter().GetResult(); - } - /// /// Starts the driver service if it is not already running. /// From 2c817102764dc849761dd38bf09f5124beb5040b Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko <22616990+nvborisenko@users.noreply.github.com> Date: Thu, 9 Apr 2026 21:37:41 +0300 Subject: [PATCH 3/3] Delete ICommandServer.cs --- dotnet/src/webdriver/Remote/ICommandServer.cs | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 dotnet/src/webdriver/Remote/ICommandServer.cs diff --git a/dotnet/src/webdriver/Remote/ICommandServer.cs b/dotnet/src/webdriver/Remote/ICommandServer.cs deleted file mode 100644 index 5db2e6029d3b8..0000000000000 --- a/dotnet/src/webdriver/Remote/ICommandServer.cs +++ /dev/null @@ -1,32 +0,0 @@ -// -// 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 -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -namespace OpenQA.Selenium.Remote; - -/// -/// Provides a way to start a server that understands remote commands -/// -[Obsolete("This interface is no longer supported and will be removed in a future release (4.43).")] -public interface ICommandServer : IDisposable -{ - /// - /// Starts the server. - /// - void Start(); -}