Open titusfortner opened 1 year ago
Adding extensions no longer works
Hey, do you know why extensions no longer work?
(Disclaimer: I work on add-ons at Mozilla)
@willdurand hi, thanks.
Firefox Profile originates from when Selenium managed the driver before Firefox 47 and geckodriver, so we needed to populate everything. Doing that with Profile class made sense.
Right now, the accepted way to add these to Firefox is with a method to geckodriver after the session is started - https://www.selenium.dev/documentation/webdriver/browsers/firefox/#add-ons
The Profile class generates a default profile, adds things to the places they need to be, then sends it to geckodriver for use with Firefox when it starts. Looking at a "real" profile and comparing where the Profile class was putting extensions, didn't match, and I didn't see how to put extensions the way they need to be used in the place that Firefox needs to see them. If you know where to put extensions (in what format) in what location for Firefox to use it, we can do something with that. Ideally, though, geckodriver would manage that by allowing users to put it in options directly like Chrome - https://github.com/mozilla/geckodriver/issues/1476
If you want to discuss more, please find us on irc/matrix/slack - https://www.selenium.dev/support/#ChatRoom Thanks!
@titusfortner hi 👋 is this issue still actual? Should it be closed? It's not my first mention of someone from the dev team, sorry. In search of tasks I could help with, I found some obsolete tasks like this one. I guess some tasks in the issues backlog are not relevant now.
Feature and motivation
I created a huge PR that removed a bunch of outdated Firefox Profile functionality (https://github.com/SeleniumHQ/selenium/pull/11118), but we agreed at a TLC meeting, that even if the functionality no longer works, we should go through and deprecate things.
Honestly, we can probably get away with deprecating the whole class and having the FirefoxOptions class method/property for
setProfile
just take the path of the directory to zip and use. We would need to test to make sure you can use a directory and add preferences to it via options, or if we need the Firefox profile for that.Usage example
n/a