Skip to content

[dotnet][java][js][py][rb] remove deprecated Firefox profile extension and cert methods - #18066

Merged
titusfortner merged 2 commits into
SeleniumHQ:trunkfrom
titusfortner:remove-firefox-profile-deprecations
Sep 22, 2026
Merged

titusfortner merged 2 commits into
SeleniumHQ:trunkfrom
titusfortner:remove-firefox-profile-deprecations

Conversation

@titusfortner

Copy link
Copy Markdown
Member

🔗 Related Issues

Finishes work from #17871 & #13477

💥 What does this PR do?

Removes deprecated/invalid Firefox profile code (including extension and certificate management)

🔧 Implementation Notes

  • Ruby's rexml is removed from the gemspec as a direct dependency, but it is kept as a transitive dev dependency

🤖 AI assistance

  • AI assisted (complete below)
    • Tool(s): Claude Code (Opus 5)
    • What was generated: the cross-binding audit of what each deprecation left dead, the removals, and this description
    • I reviewed all AI output and can explain the change

💡 Additional Considerations

  • Things in third_party can be cleaned up in a future PR

🔄 Types of changes

  • Breaking change (following Selenium's deprecation policy)

@selenium-ci selenium-ci added C-py Python Bindings C-rb Ruby Bindings C-dotnet .NET Bindings C-java Java Bindings C-nodejs JavaScript Bindings B-build Includes scripting, bazel and CI integrations labels Sep 22, 2026
@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Remove deprecated Firefox profile APIs across language bindings

✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Removes deprecated Firefox profile extension installation APIs across five language bindings.
• Removes obsolete Java, Python, and Ruby profile certificate and legacy settings.
• Cleans related tests, build fixtures, signatures, and Ruby's direct REXML dependency.
Diagram

graph TD
  Legacy["Deprecated profile APIs"] -.-> DotNet[".NET binding"] & Java["Java binding"] & JavaScript["JavaScript binding"] & Python["Python binding"] & Ruby["Ruby binding"]
  DotNet & Java & JavaScript & Python & Ruby -->|"add-ons"| AddOn["Driver add-on API"]
  Java & Python & Ruby -->|"certificates"| Certs["Options certificates"]
Loading
High-Level Assessment

Direct removal is appropriate because these public APIs were already deprecated and supported replacements exist at the driver or options level. Retaining compatibility shims or runtime-failing methods would prolong dead profile-management code and preserve unnecessary parsing and dependency surfaces.

Files changed (13) +7 / -637

Refactor (7) +7 / -530
FirefoxProfile.csRemove profile-based Firefox extension installation +0/-32

Remove profile-based Firefox extension installation

• Removes the deprecated AddExtension API, extension registry, and profile-layout installation phase. Firefox profiles now serialize preferences and existing profile content without staging add-ons.

dotnet/src/webdriver/Firefox/FirefoxProfile.cs

FirefoxProfile.javaRemove deprecated extension and legacy profile settings +0/-126

Remove deprecated extension and legacy profile settings

• Removes extension registration and installation from profile layout. Also removes obsolete no-focus native-event methods and profile-level certificate setters in favor of supported session options.

java/src/org/openqa/selenium/firefox/FirefoxProfile.java

firefox.jsRemove Firefox Options profile extension support +7/-104

Remove Firefox Options profile extension support

• Removes add-on archive parsing, profile extension staging, AddonFormatError, and Options.addExtensions. Profile serialization now archives only an explicitly supplied template, and documentation demonstrates preference configuration instead.

javascript/selenium-webdriver/firefox.js

firefox_profile.pyRemove deprecated Python FirefoxProfile APIs +0/-215

Remove deprecated Python FirefoxProfile APIs

• Removes profile-based add-on installation and manifest parsing, including AddonFormatError. Also removes deprecated port and untrusted-certificate properties now owned by Service and Options.

py/selenium/webdriver/firefox/firefox_profile.py

firefox.rbStop loading the removed Ruby extension implementation +0/-2

Stop loading the removed Ruby extension implementation

• Removes the REXML document require and Firefox::Extension autoload because profile extension parsing has been deleted.

rb/lib/selenium/webdriver/firefox.rb

profile.rbRemove deprecated Ruby profile extension and legacy settings +0/-37

Remove deprecated Ruby profile extension and legacy settings

• Removes extension tracking, installation, and name derivation from profile layout. Also removes deprecated port, secure SSL, and no-focus setters.

rb/lib/selenium/webdriver/firefox/profile.rb

profile.rbsSynchronize Ruby profile signatures with API removals +0/-14

Synchronize Ruby profile signatures with API removals

• Removes extension state and methods plus deprecated port, secure SSL, and no-focus writer declarations from the Firefox Profile RBS definition.

rb/sig/lib/selenium/webdriver/firefox/profile.rbs

Tests (2) +0 / -88
FirefoxProfileTest.javaRemove tests for deprecated profile extension installation +0/-32

Remove tests for deprecated profile extension installation

• Deletes tests for installing Firefox extensions from XPI files, directories, and classpath resources, along with their unused imports and fixture constants.

java/test/org/openqa/selenium/firefox/FirefoxProfileTest.java

options_test.jsRemove JavaScript addExtensions integration coverage +0/-56

Remove JavaScript addExtensions integration coverage

• Deletes Firefox Options tests for installing extensions into new and custom profiles. Associated extension resources, element assertions, and imports are also removed.

javascript/selenium-webdriver/test/firefox/options_test.js

Other (4) +0 / -19
BUILD.bazelDrop Java extension-test fixtures and dependencies +0/-12

Drop Java extension-test fixtures and dependencies

• Removes the copied XPI fixture, extension data targets, and build-helper dependency that were only needed by deleted FirefoxProfile extension tests.

java/test/org/openqa/selenium/firefox/BUILD.bazel

Gemfile.lockRemove direct REXML runtime dependency +0/-1

Remove direct REXML runtime dependency

• Updates the locked selenium-webdriver dependency list so REXML is no longer required directly at runtime.

rb/Gemfile.lock

selenium-webdriver.gemspecDrop REXML from runtime gem dependencies +0/-1

Drop REXML from runtime gem dependencies

• Removes the direct REXML dependency after deleting the Firefox extension RDF parser. REXML remains available transitively for development where required.

rb/selenium-webdriver.gemspec

BUILD.bazelRemove obsolete Ruby extension test data +0/-5

Remove obsolete Ruby extension test data

• Drops legacy Firebug XPI fixtures from the Ruby unit-test target because extension parser coverage has been removed.

rb/spec/unit/BUILD.bazel

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📜 Skill insights (0)

Grey Divider


Action required

1. Java users lose an undeprecated API 📘 Rule violation ≡ Correctness
Description
The public containsWebDriverExtension() method is removed even though it has no @Deprecated
annotation or migration message. Existing callers compiling or linking against FirefoxProfile lose
this query on upgrade, while the adjacent extension APIs had explicit deprecation markers and
replacements.
Code

java/src/org/openqa/selenium/firefox/FirefoxProfile.java[L147-149]

-  public boolean containsWebDriverExtension() {
-    return extensions.containsKey("webdriver");
-  }
Evidence
PR Compliance ID 1 permits public API removal only after the documented deprecation process. The
removed method is public but has neither the @Deprecated annotation nor a message identifying a
supported alternative, unlike the extension methods immediately following it.

AGENTS.md: Preserve Public API and ABI Compatibility
java/src/org/openqa/selenium/firefox/FirefoxProfile.java[147-155]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The public `containsWebDriverExtension()` API is being removed without first completing a documented deprecation cycle or giving callers migration guidance.

## Fix Focus Areas
- java/src/org/openqa/selenium/firefox/FirefoxProfile.java[147-149]

## Recommended Fix
Restore `containsWebDriverExtension()` for the current release, mark it for removal, and provide a deprecation message identifying the supported replacement or migration path before removing it in a later breaking release.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
Review mode: 🧠 Deep: This is a cross-language, breaking public API removal with 49 edit sites across multiple Firefox profile and extension code paths, creating substantial opportunity for independent compatibility or build defects.

Grey Divider

Tip of the day
💡 Did you know, you can route each action level your way: inline, summary, both, or drop

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread java/src/org/openqa/selenium/firefox/FirefoxProfile.java
@titusfortner
titusfortner merged commit 9522517 into SeleniumHQ:trunk Sep 22, 2026
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-build Includes scripting, bazel and CI integrations C-dotnet .NET Bindings C-java Java Bindings C-nodejs JavaScript Bindings C-py Python Bindings C-rb Ruby Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants