From 6aa667a8bdb5912d04b5f9b8b9ebb65cd2af3076 Mon Sep 17 00:00:00 2001 From: Puja Jagani Date: Tue, 4 Feb 2025 10:11:41 +0530 Subject: [PATCH 1/5] [java] Add the debuggerAddress capability back to Firefox options --- java/src/org/openqa/selenium/firefox/FirefoxOptions.java | 1 + 1 file changed, 1 insertion(+) diff --git a/java/src/org/openqa/selenium/firefox/FirefoxOptions.java b/java/src/org/openqa/selenium/firefox/FirefoxOptions.java index c5c22f7791a73..6f514c79aec60 100644 --- a/java/src/org/openqa/selenium/firefox/FirefoxOptions.java +++ b/java/src/org/openqa/selenium/firefox/FirefoxOptions.java @@ -62,6 +62,7 @@ public class FirefoxOptions extends AbstractDriverOptions { public FirefoxOptions() { setCapability(CapabilityType.BROWSER_NAME, FIREFOX.browserName()); setAcceptInsecureCerts(true); + setCapability("moz:debuggerAddress", 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/. From 59b731134ec543436c255508a6bd9f1271786a42 Mon Sep 17 00:00:00 2001 From: Puja Jagani Date: Tue, 4 Feb 2025 14:49:08 +0530 Subject: [PATCH 2/5] Fix python and ruby tests --- py/BUILD.bazel | 3 ++- rb/spec/integration/selenium/webdriver/devtools_spec.rb | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/py/BUILD.bazel b/py/BUILD.bazel index c9c2c31439548..87d6d41e5a3dd 100644 --- a/py/BUILD.bazel +++ b/py/BUILD.bazel @@ -523,7 +523,8 @@ py_test_suite( srcs = glob([ "test/selenium/webdriver/marionette/**/*.py", "test/selenium/webdriver/firefox/**/*.py", - ]), + ], + exclude = ["test/selenium/webdriver/common/devtools_tests.py"]), args = [ "--instafail", ] + BROWSERS["firefox"]["args"], diff --git a/rb/spec/integration/selenium/webdriver/devtools_spec.rb b/rb/spec/integration/selenium/webdriver/devtools_spec.rb index 2247424a6a503..bf0245a538639 100644 --- a/rb/spec/integration/selenium/webdriver/devtools_spec.rb +++ b/rb/spec/integration/selenium/webdriver/devtools_spec.rb @@ -112,9 +112,6 @@ module WebDriver expect(logs).to include( an_object_having_attributes(type: :log, args: [hash_including('type' => 'object')]) ) - expect(logs).to include( - an_object_having_attributes(type: :log, args: [hash_including('location')]) - ) end it 'notifies about exceptions' do From 649de7052b0f7ad5d35e6e58a2041a91688863f5 Mon Sep 17 00:00:00 2001 From: Puja Jagani Date: Tue, 4 Feb 2025 15:39:38 +0530 Subject: [PATCH 3/5] Ignore CDP tests with Firefox against the Grid --- py/test/selenium/webdriver/common/devtools_tests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/py/test/selenium/webdriver/common/devtools_tests.py b/py/test/selenium/webdriver/common/devtools_tests.py index df89b44a4a8a4..bdbb196878299 100644 --- a/py/test/selenium/webdriver/common/devtools_tests.py +++ b/py/test/selenium/webdriver/common/devtools_tests.py @@ -21,6 +21,7 @@ @pytest.mark.xfail_safari @pytest.mark.xfail_firefox +@pytest.mark.xfail_remote def test_check_console_messages(driver, pages): with pytest.warns(None) as record: devtools, connection = driver.start_devtools() From 7ede49f85777b0aa4f15f29591f2ef7779777508 Mon Sep 17 00:00:00 2001 From: Puja Jagani Date: Tue, 11 Feb 2025 13:52:28 +0530 Subject: [PATCH 4/5] Revert changes made to firefox options --- java/src/org/openqa/selenium/firefox/FirefoxOptions.java | 1 - 1 file changed, 1 deletion(-) diff --git a/java/src/org/openqa/selenium/firefox/FirefoxOptions.java b/java/src/org/openqa/selenium/firefox/FirefoxOptions.java index 6f514c79aec60..c5c22f7791a73 100644 --- a/java/src/org/openqa/selenium/firefox/FirefoxOptions.java +++ b/java/src/org/openqa/selenium/firefox/FirefoxOptions.java @@ -62,7 +62,6 @@ public class FirefoxOptions extends AbstractDriverOptions { public FirefoxOptions() { setCapability(CapabilityType.BROWSER_NAME, FIREFOX.browserName()); setAcceptInsecureCerts(true); - setCapability("moz:debuggerAddress", 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/. From e5feb97ff115645ff49407c03c8befdbcd23263f Mon Sep 17 00:00:00 2001 From: Puja Jagani Date: Tue, 11 Feb 2025 14:20:12 +0530 Subject: [PATCH 5/5] Fix formatting --- py/BUILD.bazel | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/py/BUILD.bazel b/py/BUILD.bazel index 87d6d41e5a3dd..426f8f03a7cbe 100644 --- a/py/BUILD.bazel +++ b/py/BUILD.bazel @@ -520,11 +520,13 @@ py_test_suite( py_test_suite( name = "test-firefox", size = "large", - srcs = glob([ - "test/selenium/webdriver/marionette/**/*.py", - "test/selenium/webdriver/firefox/**/*.py", - ], - exclude = ["test/selenium/webdriver/common/devtools_tests.py"]), + srcs = glob( + [ + "test/selenium/webdriver/marionette/**/*.py", + "test/selenium/webdriver/firefox/**/*.py", + ], + exclude = ["test/selenium/webdriver/common/devtools_tests.py"], + ), args = [ "--instafail", ] + BROWSERS["firefox"]["args"],