appstract/laravel-dusk-safari

Run Dusk tests on Safari

Package info

github.com/appstract/laravel-dusk-safari

pkg:composer/appstract/laravel-dusk-safari

Statistics

Installs: 7 878

Dependents: 0

Suggesters: 0

Stars: 11

Open Issues: 0

1.0.0 2018-01-22 14:54 UTC

Requires

  • php: >=5.6

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 60f18161b6e0663dab8fe98f4b1890c6aaaa9010

testinglaravelsafariappstractdusk

This package is auto-updated.

Last update: 2026-06-15 02:14:39 UTC


README

👁 Latest Version on Packagist
👁 Total Downloads
👁 Software License
👁 Build Status

This package allows you to use the built-in Safari WebDriver of macOS, so you don't need Selenium to run Dusk tests in Safari.

This requires Safari 10 or higher.

Installation

You can install the package via composer:

composer require appstract/laravel-dusk-safari

Usage

Make sure to enable Remote Automation in the Safari menu bar:

Develop > Allow Remote Automation.

Add the SupportsSafari trait to your DuskTestCase:

use Appstract\DuskDrivers\Safari\SupportsSafari;

abstract class DuskTestCase extends BaseTestCase
{
 use CreatesApplication, SupportsSafari;
}

Now you can start the server in the prepare method:

public static function prepare()
{
 static::startSafariDriver();
}

Instruct Dusk to use Safari by changing DesiredCapabilities::chrome() to DesiredCapabilities::safari() in the Driver method:

protected function driver()
{
 return RemoteWebDriver::create(
 'http://localhost:9515', DesiredCapabilities::safari()
 );
}

Contributing

Contributions are welcome, thanks to y'all :)

About Appstract

Appstract is a small team from The Netherlands. We create (open source) tools for webdevelopment and write about related subjects on Medium. You can follow us on Twitter, buy us a beer or support us on Patreon.

License

The MIT License (MIT). Please see License File for more information.