diff --git a/Rakefile b/Rakefile index 0d5852d17385f..454096c176366 100644 --- a/Rakefile +++ b/Rakefile @@ -586,6 +586,7 @@ namespace :py do new_version = updated_version(old_version, arguments[:version], nightly) ['py/setup.py', + 'py/pyproject.toml', 'py/BUILD.bazel', 'py/selenium/__init__.py', 'py/selenium/webdriver/__init__.py', diff --git a/dotnet/src/webdriver/Firefox/FirefoxDriver.cs b/dotnet/src/webdriver/Firefox/FirefoxDriver.cs index da3061c897d8b..99f9cb3ea68c6 100644 --- a/dotnet/src/webdriver/Firefox/FirefoxDriver.cs +++ b/dotnet/src/webdriver/Firefox/FirefoxDriver.cs @@ -413,6 +413,7 @@ public DevToolsSession GetDevToolsSession(int devToolsProtocolVersion) /// Creates a session to communicate with a browser using a Developer Tools debugging protocol. /// /// The active session to use to communicate with the Developer Tools debugging protocol. + [Obsolete("CDP support for Firefox is deprecated and will be removed in future versions. Please switch to WebDriver BiDi.")] public DevToolsSession GetDevToolsSession(DevToolsOptions options) { if (this.devToolsSession == null) diff --git a/dotnet/src/webdriver/Remote/RemoteWebDriver.cs b/dotnet/src/webdriver/Remote/RemoteWebDriver.cs index 35a32af124d78..8483eb2fbc3ec 100644 --- a/dotnet/src/webdriver/Remote/RemoteWebDriver.cs +++ b/dotnet/src/webdriver/Remote/RemoteWebDriver.cs @@ -17,6 +17,7 @@ // under the License. // +using OpenQA.Selenium.Internal.Logging; using OpenQA.Selenium.DevTools; using System; using System.Collections.Generic; @@ -63,6 +64,8 @@ namespace OpenQA.Selenium.Remote /// public class RemoteWebDriver : WebDriver, IDevTools, IHasDownloads { + private static readonly ILogger _logger = OpenQA.Selenium.Internal.Logging.Log.GetLogger(typeof(RemoteWebDriver)); + /// /// The name of the Selenium grid remote DevTools end point capability. /// @@ -425,6 +428,14 @@ public ReadOnlyCollection FindElementsByCssSelector(string cssSelec /// The active session to use to communicate with the Developer Tools debugging protocol. public DevToolsSession GetDevToolsSession() { + if (this.Capabilities.GetCapability(CapabilityType.BrowserName) == "firefox") + { + if (_logger.IsEnabled(LogEventLevel.Warn)) + { + _logger.Warn("CDP support for Firefox is deprecated and will be removed in future versions. Please switch to WebDriver BiDi."); + } + } + return GetDevToolsSession(new DevToolsOptions() { ProtocolVersion = DevToolsSession.AutoDetectDevToolsProtocolVersion }); }