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

Provide custom browser arguments #108

Merged
merged 3 commits into from
Dec 1, 2023

Conversation

Meddington
Copy link
Contributor

@Meddington Meddington commented Oct 19, 2023

Add a new CLI option --browserOptions that allows users to pass browser arguments that will be used when launching a browser instance.

This is useful when testing extensions that require external network access via fetch() or similar. By default accessing external sites is prevented in chromium and requires the --disable-web-security flag. Without this new option a user is left to manual modify the startup arguments.

It's likely that users will run into other cases that require passing in a browser cli argument, so a generic option has been added instead of special casing --disable-web-security.

I didn't spot any unit tests, so no tests are included.

@Meddington
Copy link
Contributor Author

@microsoft-github-policy-service agree

@Meddington Meddington changed the title Provide custom browser arguments via --browserOptions Provide custom browser arguments Oct 19, 2023
@aeschli aeschli enabled auto-merge (squash) December 1, 2023 09:44
@aeschli aeschli merged commit f876a3b into microsoft:main Dec 1, 2023
2 checks passed
@aeschli
Copy link
Contributor

aeschli commented Dec 1, 2023

Thanks @Meddington, that's a good feature, nice PR.
I changed the option name to --browserOption that can be used multiple times when there is more than one optioto set.
That's what we already do for the -permission argument and is a thing that minimist supports (the library that we use for argument parsing).
That also allows to remove the dependency on shell-quote (the less dependencies, the better)

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.

None yet

5 participants