Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# CHANGELOG

## [Unreleased]

### Added
- `channel` launch option
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,19 @@ $driver = new PlaywrightDriver(
);
```

`launchOptions` supports `slowMo`, `args` and `channel`. A channel picks a
browser build or an installed branded browser, such as full Chromium instead
of the headless shell Playwright uses for headless runs by default:

```php
$driver = new PlaywrightDriver(
browserType: 'chromium',
launchOptions: [
'channel' => 'chromium',
],
);
```

## Documentation

See [Driver support](docs/driver-support.md) for the tested Mink surface and
Expand Down
4 changes: 4 additions & 0 deletions src/Driver/PlaywrightDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ public function start(): void
$builder = $builder->withArgs($args);
}

if (isset($this->launchOptions['channel']) && is_string($this->launchOptions['channel'])) {
$builder = $builder->withChannel($this->launchOptions['channel']);
}

$this->browser = $builder->launch();

$contextOptions = $this->contextOptions;
Expand Down
Loading