feat: expose Playwright launch params in BrowserConfig (#1820)#1876
Open
hafezparast wants to merge 1 commit intounclecode:developfrom
Open
feat: expose Playwright launch params in BrowserConfig (#1820)#1876hafezparast wants to merge 1 commit intounclecode:developfrom
hafezparast wants to merge 1 commit intounclecode:developfrom
Conversation
Add 4 new params to BrowserConfig for users with custom browser binaries: - executable_path: path to custom Chromium binary (Brave, ungoogled-chromium, etc.) - ignore_default_args: list of default Chromium flags to exclude from launch - skip_default_browser_args: skip all hardcoded browser args, use only extra_args - skip_default_headers: skip forced User-Agent/sec-ch-ua header overrides All defaults unchanged — fully backward compatible. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BrowserConfigfor custom browser binary supportCloses discussion #1820
New Parameters
executable_pathstrNoneignore_default_argslistNoneskip_default_browser_argsboolFalseextra_argsskip_default_headersboolFalseUsage
Already covered (no changes needed)
device_scale_factor— already configurable (PR Add configurable device_scale_factor for improved screenshot quality #1463)override_navigator=False— already onCrawlerRunConfigTest plan
to_dict()/load()roundtrip preserves all paramsclone()preserves and overrides correctly_build_browser_args(): default includes hardcoded args_build_browser_args():skip_default_browser_args=True→ only extra_args_build_browser_args():executable_path/ignore_default_argspassed to launch dictManagedBrowser.build_browser_flags(): same skip logic workssetup_context(): default sets User-Agent headerssetup_context():skip_default_headers=Trueskips UA overridesetup_context(): custom headers still work with skip🤖 Generated with Claude Code