creasi/dusk-browserstack

Additional BrowserSstack Supports for Laravel Dusk
11,543 2
Install
composer require creasi/dusk-browserstack
Latest Version:v0.3.8
PHP:^8.1
License:MIT
Last Updated:Sep 9, 2026
Links: GitHub  ·  Packagist
Maintainer: feryardiant

Version License

Additional BrowserStack Local Supports for Laravel Dusk

Installation

Use Composer

$ composer require creasi/dusk-browserstack --dev

Usage

  1. Add WithBrowserStack to your existing DuskTestCase, like so

    use Laravel\Dusk\TestCase as BaseTestCase;
    use Creasi\DuskBrowserStack\WithBrowserStack;
    
    abstract class DuskTestCase extends BaseTestCase
    {
        use CreatesApplication;
        use WithBrowserStack;
    
        // ...
    }
    
  2. Update prepare method

    use Creasi\DuskBrowserStack\BrowserStack;
    
    public static function prepare()
    {
        if (BrowserStack::hasAccessKey()) {
            static::startBrowserStackLocal();
            return;
        }
    
        if (! static::runningInSail()) {
            static::startChromeDriver();
        }
    }
    
  3. Update driver method

    use Creasi\DuskBrowserStack\BrowserStack;
    
    protected function driver()
    {
        // ...
    
        $capabilities = DesiredCapabilities::chrome()
            ->setCapability(ChromeOptions::CAPABILITY, $options);
    
        return RemoteWebDriver::create(
            BrowserStack::getDriverURL(),
            $this->withBrowserStackCapabilities($capabilities)
        );
    }
    
  4. Last one, don't forget to update your .env file

    BROWSERSTACK_USERNAME='<your-browserstack-username>'
    BROWSERSTACK_ACCESS_KEY='<your-browserstack-access-key>'
    

License

This library is open-sourced software licensed under MIT license.

Related Packages

dannyreinders/dusk-browserstack

Easily run Laravel Dusk tests on BrowserStack.

1,343 0
galahad/dusk-browserstack

Easily run Laravel Dusk tests on BrowserStack.

7,884 6
lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users...

20,619,309 2,340
igaster/laravel-theme

Laravel Themes: Asset & Views folder per theme. Theme inheritance. Blade integra...

1,279,271 515
jrenton/laravel-5-scaffold

Fastest way to rapidly scaffold a laravel application

268 4