File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -401,6 +401,7 @@ public DevToolsSession GetDevToolsSession(int devToolsProtocolVersion)
401401 /// Creates a session to communicate with a browser using a Developer Tools debugging protocol.
402402 /// </summary>
403403 /// <returns>The active session to use to communicate with the Developer Tools debugging protocol.</returns>
404+ [ Obsolete ( "CDP support for Firefox is deprecated and will be removed in future versions. Please switch to WebDriver BiDi." ) ]
404405 public DevToolsSession GetDevToolsSession ( DevToolsOptions options )
405406 {
406407 if ( this . devToolsSession == null )
Original file line number Diff line number Diff line change @@ -63,6 +63,8 @@ namespace OpenQA.Selenium.Remote
6363 /// </example>
6464 public class RemoteWebDriver : WebDriver , IDevTools , IHasDownloads
6565 {
66+ private readonly ILogger _logger = Log . GetLogger ( typeof ( RemoteWebDriver ) ) ;
67+
6668 /// <summary>
6769 /// The name of the Selenium grid remote DevTools end point capability.
6870 /// </summary>
@@ -425,6 +427,14 @@ public ReadOnlyCollection<IWebElement> FindElementsByCssSelector(string cssSelec
425427 /// <returns>The active session to use to communicate with the Developer Tools debugging protocol.</returns>
426428 public DevToolsSession GetDevToolsSession ( )
427429 {
430+ if ( this . Capabilities . GetCapability ( BrowserName ) == "firefox" )
431+ {
432+ if ( _logger . IsEnabled ( LogEventLevel . Warn ) )
433+ {
434+ _logger . Warn ( "CDP support for Firefox is deprecated and will be removed in future versions. Please switch to WebDriver BiDi." ) ;
435+ }
436+ }
437+
428438 return GetDevToolsSession ( new DevToolsOptions ( ) { ProtocolVersion = DevToolsSession . AutoDetectDevToolsProtocolVersion } ) ;
429439 }
430440
You can’t perform that action at this time.
0 commit comments