Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Behat Chrome Extension

Behat Chrome Extension Laravel Package

sylius-labs/behat-chrome-extension

Behat extension for controlling Chrome without Selenium, communicating directly over HTTP and WebSockets for speed at least twice as fast. Supports headless Chrome 59+, with configurable SSL validation, socket timeout, and download behavior.

View on GitHub
Deep Wiki
Context7

Behat extension for controlling Chrome via Webdriver interface.

Frequently asked questions about Behat Chrome Extension
How do I install sylius-labs/behat-chrome-extension in a Laravel project?
Install it as a dev dependency with composer require --dev sylius-labs/behat-chrome-extension, because it is QA tooling and never a runtime requirement. Then register DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension under the extensions key of your behat.yml and point your Mink session at a Chrome instance started with remote debugging enabled. You also need Chrome or Chromium running with --remote-debugging-port=9222 before the suite executes.
Does this package work with Laravel Dusk or Pest browser testing?
No. It is a Behat extension that plugs into the Behat and Mink extension system, so it has no relationship to Laravel's service container, Dusk, or Pest browser plugins. It only makes sense if your project already has a behat.yml and a Behat/Mink acceptance suite, which is typical of Sylius storefronts and legacy e-commerce platforms. For Laravel-first applications using Dusk, this package solves a problem you do not have.
How do I configure the Chrome extension in behat.yml?
Add DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension under extensions and configure Behat\MinkExtension with browser_name: chrome and a session of type chrome whose api_url points at your debugging endpoint, for example http://localhost:9222. You can pass optional settings such as validate_certificate, socket_timeout, and download_behavior alongside the extension registration. Keep non-JS scenarios on the BrowserKit driver and reserve this Chrome session for scenarios that genuinely need JavaScript.
What are the Chrome and driver requirements for this extension?
You need Google Chrome or Chromium running with remote debugging enabled, and Chrome 59 or newer is required for headless mode. The extension talks to Chrome directly over HTTP and WebSockets using the DevTools protocol, so no Selenium server or chromedriver is involved. A typical launch looks like google-chrome-stable --headless --disable-gpu --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222.
How do I run this Behat Chrome extension headless in Docker or CI?
Start Chrome inside the container with --headless --disable-gpu --no-sandbox --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222, and make sure the Behat process waits until that port is actually accepting connections before the suite starts. The official Docker image referenced in the README ships Chrome running headless, which is a reasonable starting point. Most of the integration cost in pipelines is this Chrome lifecycle wrapper rather than the Composer package itself.
What is the difference between sylius-labs/behat-chrome-extension and dmore/behat-chrome-extension?
This package is a fork maintained by SyliusLabs of the original dmore/behat-chrome-extension, which lives on GitLab and Packagist. It keeps the same DMore\ChromeExtension namespace and configuration surface, so migration is mostly a matter of swapping the Composer package name. Install one or the other, not both, to avoid duplicate extension registration and conflicting constraints.
Why does version 1.5.1 conflict with dmore/chrome-mink-driver 2.11.0?
Version 1.5.1 is a single-change patch that adds a Composer conflict against dmore/chrome-mink-driver 2.11.0, which strongly implies that driver release broke the extension. It is a defensive pin rather than a fix, so Composer will silently resolve an older driver version instead of failing loudly. After upgrading, inspect composer.lock to confirm which chrome-mink-driver version actually resolved, and watch for the same incompatibility resurfacing in 2.12 and later.
How much faster is this than driving Chrome through Selenium?
The extension communicates with Chrome directly over HTTP and WebSockets instead of going through the WebDriver wire protocol and a Selenium server, which the maintainers benchmark at least twice as fast. The documented benchmark runs a Behat suite of 1,800 scenarios and 19,000 steps in under 18 minutes against headless Chrome 60, versus roughly 60 minutes against Chrome 58 with Xvfb and Selenium. Real-world gains depend on your scenario mix, but reduced startup and per-command overhead is the main win.
How do I configure SSL certificate validation, socket timeout, and downloads?
Set validate_certificate to false to accept invalid or self-signed certificates, which is common in staging and containerised environments. socket_timeout defaults to 10 seconds and controls how long the HTTP or WebSocket connection to Chrome may stay idle before it is considered dead. download_behavior can be set to allow to permit file downloads, otherwise it falls back to the browser configuration.
Is sylius-labs/behat-chrome-extension safe to use in production and is it actively maintained?
It is a developer and QA tooling dependency only, so it belongs in require-dev and is never loaded by a Laravel application at runtime, which keeps the blast radius of any issue confined to your test harness. Maintenance comes from a small SyliusLabs maintainer set with infrequent patch releases, so pin the version and review the changelog before bumping. Also check whether any other package requires chrome-mink-driver ^2.11, since the 1.5.1 conflict can force an unexpected downgrade.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table