File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -413,6 +413,7 @@ public DevToolsSession GetDevToolsSession(int devToolsProtocolVersion)
413
413
/// Creates a session to communicate with a browser using a Developer Tools debugging protocol.
414
414
/// </summary>
415
415
/// <returns>The active session to use to communicate with the Developer Tools debugging protocol.</returns>
416
+ [ Obsolete ( "CDP support for Firefox is deprecated and will be removed in future versions. Please switch to WebDriver BiDi." ) ]
416
417
public DevToolsSession GetDevToolsSession ( DevToolsOptions options )
417
418
{
418
419
if ( this . devToolsSession == null )
Original file line number Diff line number Diff line change 17
17
// under the License.
18
18
// </copyright>
19
19
20
+ using OpenQA . Selenium . Internal . Logging ;
20
21
using OpenQA . Selenium . DevTools ;
21
22
using System ;
22
23
using System . Collections . Generic ;
@@ -63,6 +64,8 @@ namespace OpenQA.Selenium.Remote
63
64
/// </example>
64
65
public class RemoteWebDriver : WebDriver , IDevTools , IHasDownloads
65
66
{
67
+ private static readonly ILogger _logger = OpenQA . Selenium . Internal . Logging . Log . GetLogger ( typeof ( RemoteWebDriver ) ) ;
68
+
66
69
/// <summary>
67
70
/// The name of the Selenium grid remote DevTools end point capability.
68
71
/// </summary>
@@ -425,6 +428,14 @@ public ReadOnlyCollection<IWebElement> FindElementsByCssSelector(string cssSelec
425
428
/// <returns>The active session to use to communicate with the Developer Tools debugging protocol.</returns>
426
429
public DevToolsSession GetDevToolsSession ( )
427
430
{
431
+ if ( this . Capabilities . GetCapability ( CapabilityType . BrowserName ) == "firefox" )
432
+ {
433
+ if ( _logger . IsEnabled ( LogEventLevel . Warn ) )
434
+ {
435
+ _logger . Warn ( "CDP support for Firefox is deprecated and will be removed in future versions. Please switch to WebDriver BiDi." ) ;
436
+ }
437
+ }
438
+
428
439
return GetDevToolsSession ( new DevToolsOptions ( ) { ProtocolVersion = DevToolsSession . AutoDetectDevToolsProtocolVersion } ) ;
429
440
}
430
441
You can’t perform that action at this time.
0 commit comments