Skip to content

Commit

Permalink
Update the Firefox preference to activate both CDP and WebDriver BiDi
Browse files Browse the repository at this point in the history
  • Loading branch information
pujagani committed Jun 7, 2024
1 parent d4f5964 commit ff112bc
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dotnet/src/webdriver/Firefox/FirefoxOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public FirefoxOptions()
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", 2);
this.SetPreference("remote.active-protocols", 3);
}

/// <summary>
Expand Down
49 changes: 49 additions & 0 deletions java/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion java/src/org/openqa/selenium/firefox/FirefoxOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public FirefoxOptions() {
// 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", 2);
addPreference("remote.active-protocols", 3);
}

public FirefoxOptions(Capabilities source) {
Expand Down
2 changes: 1 addition & 1 deletion javascript/node/selenium-webdriver/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class Options extends Capabilities {
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', 2)
this.setPreference('remote.active-protocols', 3)
}

/**
Expand Down
2 changes: 1 addition & 1 deletion py/selenium/webdriver/firefox/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self) -> None:
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"] = 2
self._preferences["remote.active-protocols"] = 3
self._profile = None
self.log = Log()

Expand Down
2 changes: 1 addition & 1 deletion rb/lib/selenium/webdriver/firefox/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def initialize(log_level: nil, **opts)
@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'] = 2
@options[:prefs]['remote.active-protocols'] = 3
@options[:env] ||= {}
@options[:log] ||= {level: log_level} if log_level

Expand Down

0 comments on commit ff112bc

Please sign in to comment.