Skip to content

Add withExecutablePath() to launch a browser from a custom path - #191

Open
aik099 wants to merge 1 commit into
playwright-php:mainfrom
aik099:executable-path
Open

aik099 wants to merge 1 commit into
playwright-php:mainfrom
aik099:executable-path

Conversation

@aik099

@aik099 aik099 commented Oct 24, 2026 •

Copy link
Copy Markdown

Playwright can launch a browser binary it doesn't manage through the executablePath launch option, but there was no way to set it from PHP. That's needed for Chromium-based browsers that aren't a Playwright channel, such as Brave or a locally built Chromium.

This picks up #101 by @feder-cr, which was closed when its fork was deleted, and adds the tests asked for there.

Updates:

  • BrowserBuilder::withExecutablePath() sets the executablePath launch option;
  • PlaywrightConfig::$executablePath, PlaywrightConfigBuilder::withExecutablePath() and PW_EXECUTABLE_PATH, applied in PlaywrightClient::createBrowserBuilder() the same way as channel; an explicit setter call wins over the config;
  • a "Launch a browser from a custom path" section in docs/guide/browsers.md.

When it isn't set, nothing is added to the launch payload.

Tested by hand with Brave 155 on macOS through playwright-mink, which ran the Mink driver test suite in it.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aik099

aik099 commented Oct 24, 2026

Copy link
Copy Markdown
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.

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