Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix FirefoxManager capabilities merge logic #670

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

tucksaun
Copy link

@tucksaun tucksaun commented Mar 5, 2025

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)

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