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 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

BehatChromeExtension

Tests Software License

Note: This is a fork maintained by SyliusLabs. The original package is dmore/behat-chrome-extension (on Packagist).

Behat extension for controlling chrome without the overhead of selenium.

It communicates directly with chrome over HTTP and WebSockets, which allows it to work at least twice as fast as chrome with selenium.

For chrome 59+ it supports headless mode, eliminating the need to install a display server, and the overhead that comes with it.

This driver is tested and benchmarked against a behat suite of 1800 scenarios and 19000 steps. It can successfully run it in less than 18 minutes with chrome 60 headless.

The same suite running against chrome 58 with xvfb and selenium takes ~60 minutes.

Installation:

composer require sylius-labs/behat-chrome-extension

Requirements:

  • Google chrome or chromium running with remote debugging

Example:

google-chrome-stable --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222

or headless (59+):

google-chrome-unstable --disable-gpu --headless --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222

The official docker image includes chrome 60 running headless.

See https://gitlab.com/DMore/behat-chrome-skeleton for a fully working example.

Usage:

default:
    extensions:
        DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~
        Behat\MinkExtension:
            browser_name: chrome
            base_url: http://localhost
            sessions:
                default:
                    chrome:
                        api_url: "http://localhost:9222"

Configuration

The following optional configuration settings are available

validate_certificate

Default: true

Set to false to ignore invalid ssl certificates.

socket_timeout

Default: 10

Timeout in seconds before the HTTP or WebSocket connection to the chrome browser is considered dead.

download_behavior

Default: falls back to browser configuration

Set to 'allow' to allow downloads.

dom_wait_timeout

Default: 3000

How many milliseconds we should wait for DOM to be ready after each action/transition

download_path

Default: /tmp

Set to a directory path where you would like files to be downloaded. Requires download_behavior: allow

Example:

default:
    extensions:
        DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~
        Behat\MinkExtension:
            browser_name: chrome
            base_url: http://localhost
            sessions:
                default:
                    chrome:
                        api_url: "http://localhost:9222"
                        download_behavior: allow
                        download_path: /download
                        validate_certificate: false

Contributing

You are encouraged to fork this repository and contribute your own improvements.

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.
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support