Skip to content

feat: support spawnOpts for geckodriver child process#552

Merged
christian-bromann merged 4 commits intowebdriverio-community:mainfrom
AtofStryker:feat/add_spawn_option_to_gecko
Sep 27, 2024
Merged

feat: support spawnOpts for geckodriver child process#552
christian-bromann merged 4 commits intowebdriverio-community:mainfrom
AtofStryker:feat/add_spawn_option_to_gecko

Conversation

@AtofStryker
Copy link
Copy Markdown
Contributor

I am currently migrating Cypress to use webdriver and geckodriver for our firefox automation. We have the needs to propagate some environment variables to the geckodriver process (better outlined in this bugzilla comment), which we are patching this package to accomplish now. This PR is to move this patch upstream as a contribution.

In order to propagate environment variables to the firefox process started with geckodriver, the environment variables need to be passed to the geckodriver process directly in order to be passed to firefox. This is important for setting MOZ_ prefixed variables, like MOZ_HEADLESS_HEIGHT or MOZ_HEADLESS_WIDTH. This PR allows spawn options to be passed into the geckodriver process.

Copy link
Copy Markdown
Contributor

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we document the new user parameter? Maybe including an example as well?

Comment thread src/types.ts Outdated
@AtofStryker AtofStryker force-pushed the feat/add_spawn_option_to_gecko branch from 893750d to ec9e561 Compare September 26, 2024 22:04
Comment thread src/types.ts Outdated
Copy link
Copy Markdown
Contributor

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff, LGTM 👍

@AtofStryker
Copy link
Copy Markdown
Contributor Author

Great stuff, LGTM 👍

awesome I will get the docs updated then we should be good to go!

@AtofStryker
Copy link
Copy Markdown
Contributor Author

docs updated @christian-bromann . Thank you for the really fast review on this!

@christian-bromann christian-bromann merged commit 3edaf8e into webdriverio-community:main Sep 27, 2024
@wdio-bot
Copy link
Copy Markdown
Contributor

Hey AtofStryker 👋

Thank you for your contribution to WebdriverIO! Your pull request has been marked as an "Expensable" contribution.

We've sent you an email with further instructions on how to claim your expenses from our development fund.
Please make sure to check your spam folder as well. If you have any questions, feel free to reach out to us at expense@webdriver.io or in the contributing channel on Discord.

We are looking forward to more contributions from you in the future 🙌

Have a nice day,
The WebdriverIO Team 🤖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants