Skip to content

Launch browsers from a custom executable path - #191

Merged
smnandre merged 2 commits into
playwright-php:mainfrom
aik099:executable-path
Nov 7, 2026
Merged

smnandre merged 2 commits into
playwright-php:mainfrom
aik099:executable-path

Conversation

@aik099

@aik099 aik099 commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Allow PHP callers to launch browsers such as Brave or a locally built Chromium by setting withExecutablePath() or PW_EXECUTABLE_PATH. An explicit builder setting takes precedence over configuration.

Builds on #101 by @feder-cr.

@aik099

aik099 commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

The 4 integration failures (RouteTest::testCanRedirectNavigationRequest*) aren't from this change: they fail on main too with Playwright 1.64, as in the Nightly runs since Oct 8. #186 fixes them.

@kbond kbond changed the title Add withExecutablePath() to launch a browser from a custom path Launch browsers from a custom executable path Nov 7, 2026
@codecov

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

kbond commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Rebased onto main and kept the feature’s changelog entry under Unreleased. The configuration now preserves a path named 0 instead of treating it as unset.

I verified that Chromium launches from PW_EXECUTABLE_PATH even when the path contains spaces, and that an explicit withExecutablePath() setting overrides the configured path.

@aik099

aik099 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for the review.

Is the 0 executable path have a special meaning to be considered as a valid path?

kbond commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

@aik099 No special meaning. 0 is a valid filename, but PHP treats the string "0" as false. I changed the check so only null and an empty string count as unset.

@smnandre

smnandre commented Nov 7, 2026

Copy link
Copy Markdown
Member

(sorry i failed the rebase with that new UI and merged main ... fixed and rebased, i'm merging after)

@smnandre

smnandre commented Nov 7, 2026

Copy link
Copy Markdown
Member

Thank you @aik099! Nice one, and sorry for the delay we've been very busy lately

(and @kbond obviously ❤️)

@smnandre
smnandre merged commit 2dd4181 into playwright-php:main Nov 7, 2026
10 checks passed
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.

3 participants