diff --git a/dotnet/src/webdriver/Firefox/FirefoxOptions.cs b/dotnet/src/webdriver/Firefox/FirefoxOptions.cs index 5a47af73f5771..df8610b583637 100644 --- a/dotnet/src/webdriver/Firefox/FirefoxOptions.cs +++ b/dotnet/src/webdriver/Firefox/FirefoxOptions.cs @@ -85,9 +85,6 @@ public FirefoxOptions() this.AddKnownCapabilityName(FirefoxOptions.FirefoxLegacyProfileCapability, "Profile property"); this.AddKnownCapabilityName(FirefoxOptions.FirefoxLegacyBinaryCapability, "BrowserExecutableLocation property"); this.AddKnownCapabilityName(FirefoxOptions.FirefoxEnableDevToolsProtocolCapability, "EnableDevToolsProtocol property"); - // Firefox 129 onwards the CDP protocol will not be enabled by default. Setting this preference will enable it. - // https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/. - this.SetPreference("remote.active-protocols", 3); } /// diff --git a/java/src/org/openqa/selenium/firefox/FirefoxOptions.java b/java/src/org/openqa/selenium/firefox/FirefoxOptions.java index c5c22f7791a73..09702d3a450ee 100644 --- a/java/src/org/openqa/selenium/firefox/FirefoxOptions.java +++ b/java/src/org/openqa/selenium/firefox/FirefoxOptions.java @@ -62,10 +62,6 @@ public class FirefoxOptions extends AbstractDriverOptions { public FirefoxOptions() { setCapability(CapabilityType.BROWSER_NAME, FIREFOX.browserName()); setAcceptInsecureCerts(true); - // Firefox 129 onwards the CDP protocol will not be enabled by default. Setting this preference - // will enable it. - // https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/. - addPreference("remote.active-protocols", 3); } public FirefoxOptions(Capabilities source) { diff --git a/javascript/node/selenium-webdriver/firefox.js b/javascript/node/selenium-webdriver/firefox.js index f6cd1cf1e9d7e..d3fd0c60e9280 100644 --- a/javascript/node/selenium-webdriver/firefox.js +++ b/javascript/node/selenium-webdriver/firefox.js @@ -246,9 +246,6 @@ class Options extends Capabilities { constructor(other) { super(other) this.setBrowserName(Browser.FIREFOX) - // Firefox 129 onwards the CDP protocol will not be enabled by default. Setting this preference will enable it. - // https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/. - this.setPreference('remote.active-protocols', 3) } /** diff --git a/javascript/node/selenium-webdriver/test/firefox/options_test.js b/javascript/node/selenium-webdriver/test/firefox/options_test.js index fd64b034337cb..6b4eeba21b3b1 100644 --- a/javascript/node/selenium-webdriver/test/firefox/options_test.js +++ b/javascript/node/selenium-webdriver/test/firefox/options_test.js @@ -87,13 +87,7 @@ suite( it('allows setting android activity', function () { let options = new firefox.Options().enableMobile() let firefoxOptions = options.firefoxOptions_() - assert.deepStrictEqual( - { - androidPackage: 'org.mozilla.firefox', - prefs: { 'remote.active-protocols': 3 }, - }, - firefoxOptions, - ) + assert.deepStrictEqual({ androidPackage: 'org.mozilla.firefox' }, firefoxOptions) }) }) diff --git a/py/selenium/webdriver/firefox/options.py b/py/selenium/webdriver/firefox/options.py index 4996af551b361..f0cb0324348a5 100644 --- a/py/selenium/webdriver/firefox/options.py +++ b/py/selenium/webdriver/firefox/options.py @@ -44,8 +44,6 @@ def __init__(self) -> None: super().__init__() self._binary_location = "" self._preferences: dict = {} - # Firefox 129 onwards the CDP protocol will not be enabled by default. Setting this preference will enable it. - # https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/. self._preferences["remote.active-protocols"] = 3 self._profile: Optional[FirefoxProfile] = None self.log = Log() diff --git a/py/test/unit/selenium/webdriver/firefox/firefox_options_tests.py b/py/test/unit/selenium/webdriver/firefox/firefox_options_tests.py index 7086bd4778cdb..a4a5ecbfbb09a 100644 --- a/py/test/unit/selenium/webdriver/firefox/firefox_options_tests.py +++ b/py/test/unit/selenium/webdriver/firefox/firefox_options_tests.py @@ -79,7 +79,7 @@ def test_set_proxy_isnt_in_moz_prefix(options): caps = options.to_capabilities() assert caps["proxy"]["proxyType"] == "manual" - assert caps.get("moz:firefoxOptions") == {"prefs": {"remote.active-protocols": 3}} + assert caps.get("moz:firefoxOptions") is None def test_raises_exception_if_proxy_is_not_proxy_object(options): diff --git a/py/test/unit/selenium/webdriver/remote/new_session_tests.py b/py/test/unit/selenium/webdriver/remote/new_session_tests.py index f4fc9b3b39f7c..95195f6e89a3f 100644 --- a/py/test/unit/selenium/webdriver/remote/new_session_tests.py +++ b/py/test/unit/selenium/webdriver/remote/new_session_tests.py @@ -52,7 +52,7 @@ def test_works_as_context_manager(mocker): @pytest.mark.parametrize("browser_name", ["firefox", "chrome", "ie"]) -def test_acepts_options_to_remote_driver(mocker, browser_name): +def test_accepts_options_to_remote_driver(mocker, browser_name): options = import_module(f"selenium.webdriver.{browser_name}.options") mock = mocker.patch("selenium.webdriver.remote.webdriver.WebDriver.start_session") @@ -103,7 +103,7 @@ def test_first_match_when_2_different_option_types(): "browserName": "firefox", "acceptInsecureCerts": True, "moz:debuggerAddress": True, - "moz:firefoxOptions": {"args": ["foo"], "prefs": {"remote.active-protocols": 3}}, + "moz:firefoxOptions": {"args": ["foo"]}, }, ], } diff --git a/rb/lib/selenium/webdriver/firefox/options.rb b/rb/lib/selenium/webdriver/firefox/options.rb index c702600b3bc28..23a9014ba12b0 100644 --- a/rb/lib/selenium/webdriver/firefox/options.rb +++ b/rb/lib/selenium/webdriver/firefox/options.rb @@ -64,9 +64,6 @@ def initialize(log_level: nil, **opts) @options[:args] ||= [] @options[:prefs] ||= {} - # Firefox 129 onwards the CDP protocol will not be enabled by default. Setting this preference will enable it. - # https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/. - @options[:prefs]['remote.active-protocols'] = 3 @options[:env] ||= {} @options[:log] ||= {level: log_level} if log_level diff --git a/rb/spec/unit/selenium/webdriver/firefox/driver_spec.rb b/rb/spec/unit/selenium/webdriver/firefox/driver_spec.rb index 9c65604ce6aa4..1d9a56b6e7f14 100644 --- a/rb/spec/unit/selenium/webdriver/firefox/driver_spec.rb +++ b/rb/spec/unit/selenium/webdriver/firefox/driver_spec.rb @@ -38,7 +38,7 @@ module Firefox def expect_request(body: nil, endpoint: nil) body = (body || {capabilities: {alwaysMatch: {acceptInsecureCerts: true, browserName: 'firefox', - 'moz:firefoxOptions': {prefs: {'remote.active-protocols' => 3}}, + 'moz:firefoxOptions': {}, 'moz:debuggerAddress': true}}}).to_json endpoint ||= "#{service_manager.uri}/session" stub_request(:post, endpoint).with(body: body).to_return(valid_response) @@ -79,10 +79,7 @@ def expect_request(body: nil, endpoint: nil) opts = {args: ['-f']} expect_request(body: {capabilities: {alwaysMatch: {acceptInsecureCerts: true, browserName: 'firefox', - 'moz:firefoxOptions': { - args: ['-f'], - prefs: {'remote.active-protocols' => 3} - }, + 'moz:firefoxOptions': opts, 'moz:debuggerAddress': true}}}) expect { described_class.new(options: Options.new(**opts)) }.not_to raise_exception end diff --git a/rb/spec/unit/selenium/webdriver/firefox/options_spec.rb b/rb/spec/unit/selenium/webdriver/firefox/options_spec.rb index 911dd9ff9c99d..c849054f8dc12 100644 --- a/rb/spec/unit/selenium/webdriver/firefox/options_spec.rb +++ b/rb/spec/unit/selenium/webdriver/firefox/options_spec.rb @@ -154,7 +154,7 @@ module Firefox options.add_preference('intl.accepted_languages', 'en-US') prefs = options.as_json['moz:firefoxOptions']['prefs'] - expected = {'intl.accepted_languages' => 'en-US', 'remote.active-protocols' => 3} + expected = {'intl.accepted_languages' => 'en-US'} expect(prefs).to eq(expected) end end @@ -185,7 +185,7 @@ module Firefox it 'returns empty options by default' do expect(options.as_json).to eq('browserName' => 'firefox', 'acceptInsecureCerts' => true, - 'moz:firefoxOptions' => {'prefs' => {'remote.active-protocols' => 3}}, + 'moz:firefoxOptions' => {}, 'moz:debuggerAddress' => true) end @@ -195,7 +195,7 @@ module Firefox 'browserName' => 'firefox', 'foo:bar' => {'foo' => 'bar'}, 'moz:debuggerAddress' => true, - 'moz:firefoxOptions' => {'prefs' => {'remote.active-protocols' => 3}}) + 'moz:firefoxOptions' => {}) end it 'converts to a json hash' do @@ -240,7 +240,7 @@ module Firefox 'moz:debuggerAddress' => true, key => {'args' => %w[foo bar], 'binary' => '/foo/bar', - 'prefs' => {'foo' => 'bar', 'remote.active-protocols' => 3}, + 'prefs' => {'foo' => 'bar'}, 'env' => {'FOO' => 'bar'}, 'profile' => 'encoded_profile', 'log' => {'level' => 'debug'},