behat/mink-sahi-driver integrates Sahi.JS (a JavaScript-based automation tool) into the Mink testing framework, enabling advanced UI testing for Laravel applications. This is particularly useful for end-to-end (E2E) testing where traditional Selenium or PHPUnit may fall short (e.g., complex JavaScript-heavy UIs, AJAX interactions, or dynamic content).composer.json:
{
"require-dev": {
"behat/mink": "^1.5",
"behat/mink-sahi-driver": "^1.1",
"behat/behat": "^3.7" // If using Behat
}
}
composer require laravel/browsershot # For headless Chrome
composer require (laravel/playwright) # If available
mix-manifest.json, ensure Sahi.JS resolves asset paths correctly (may require static URLs in tests).DatabaseTransactions trait in Behat contexts to avoid test pollution.selenium/standalone-firefox).How can I help you explore Laravel packages today?