File tree 5 files changed +16
-0
lines changed
dotnet/src/webdriver/Firefox
java/src/org/openqa/selenium/firefox
javascript/node/selenium-webdriver
py/selenium/webdriver/firefox
rb/lib/selenium/webdriver/firefox 5 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,9 @@ public FirefoxOptions()
88
88
this . AddKnownCapabilityName ( FirefoxOptions . FirefoxLegacyProfileCapability , "Profile property" ) ;
89
89
this . AddKnownCapabilityName ( FirefoxOptions . FirefoxLegacyBinaryCapability , "BrowserExecutableLocation property" ) ;
90
90
this . AddKnownCapabilityName ( FirefoxOptions . FirefoxEnableDevToolsProtocolCapability , "EnableDevToolsProtocol property" ) ;
91
+ // Firefox 129 onwards the CDP protocol will not be enabled by default. Setting this preference will enable it.
92
+ // https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/.
93
+ this . SetPreference ( "remote.active-protocols" , 2 ) ;
91
94
}
92
95
93
96
/// <summary>
Original file line number Diff line number Diff line change @@ -63,6 +63,10 @@ public FirefoxOptions() {
63
63
setCapability (CapabilityType .BROWSER_NAME , FIREFOX .browserName ());
64
64
setAcceptInsecureCerts (true );
65
65
setCapability ("moz:debuggerAddress" , true );
66
+ // Firefox 129 onwards the CDP protocol will not be enabled by default. Setting this preference
67
+ // will enable it.
68
+ // https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/.
69
+ addPreference ("remote.active-protocols" , 2 );
66
70
}
67
71
68
72
public FirefoxOptions (Capabilities source ) {
Original file line number Diff line number Diff line change @@ -246,6 +246,9 @@ class Options extends Capabilities {
246
246
constructor ( other ) {
247
247
super ( other )
248
248
this . setBrowserName ( Browser . FIREFOX )
249
+ // Firefox 129 onwards the CDP protocol will not be enabled by default. Setting this preference will enable it.
250
+ // https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/.
251
+ this . setPreference ( 'remote.active-protocols' , 2 )
249
252
}
250
253
251
254
/**
Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ def __init__(self) -> None:
41
41
super ().__init__ ()
42
42
self ._binary_location = ""
43
43
self ._preferences : dict = {}
44
+ # Firefox 129 onwards the CDP protocol will not be enabled by default. Setting this preference will enable it.
45
+ # https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/.
46
+ self ._preferences ["remote.active-protocols" ] = 2
44
47
self ._profile = None
45
48
self .log = Log ()
46
49
Original file line number Diff line number Diff line change @@ -64,6 +64,9 @@ def initialize(log_level: nil, **opts)
64
64
65
65
@options [ :args ] ||= [ ]
66
66
@options [ :prefs ] ||= { }
67
+ # Firefox 129 onwards the CDP protocol will not be enabled by default. Setting this preference will enable it.
68
+ # https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/.
69
+ @options [ :prefs ] [ 'remote.active-protocols' ] = 2
67
70
@options [ :env ] ||= { }
68
71
@options [ :log ] ||= { level : log_level } if log_level
69
72
You can’t perform that action at this time.
0 commit comments