Skip to content

fix: fix FirefoxManager capabilities merge logic - #670

Open
tucksaun wants to merge 5 commits into
symfony:mainfrom
tucksaun:fix/ff-manager-options
Open

fix: fix FirefoxManager capabilities merge logic#670
tucksaun wants to merge 5 commits into
symfony:mainfrom
tucksaun:fix/ff-manager-options

Conversation

@tucksaun

@tucksaun tucksaun commented Mar 5, 2025

Copy link
Copy Markdown
Member

Hi there!

While working on Firefox log capturing for a project (basically it requires setting devtools.console.stdout.content as moz:firefoxOptions > pref) I discovered the FirefoxManager behavior regarding options merging looked strange:
as soon as one sets the moz:firefoxOptions almost all the automation is gone (binary, args, and default prefs are gone).

While redefining most of them could be okay, this makes configuration via environment variables inoperant out of the blue, which is not in sync with how ChromeManager works.
This also drops the sensible defaults FirefoxOptions.

This MR tries to address this issue.

It is not easy (or even possible) to introspect the moz:firefoxOptions sent to the browser by connecting to it. I didn't find anywhere to hook into the library to check our required capabilities. This is why I took the liberty to introduce a new private method and access it via the reflection in the test suite. This is not the best but I don't see another way atm. Any suggestion is welcome!

(PS: I also added some basic tests for the FirefoxManager based on the ChomeManager ones)

@tucksaun
tucksaun force-pushed the fix/ff-manager-options branch from 1e128eb to 2a4af03 Compare June 17, 2025 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant