Package Data | |
---|---|
Maintainer Username: | gizburdt |
Maintainer Contact: | hello@appstract.team (Olav van Schie) |
Package Create Date: | 2017-07-03 |
Package Last Update: | 2022-10-19 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-23 03:07:14 |
Package Statistics | |
---|---|
Total Downloads: | 4,765 |
Monthly Downloads: | 60 |
Daily Downloads: | 0 |
Total Stars: | 11 |
Total Watchers: | 5 |
Total Forks: | 2 |
Total Open Issues: | 1 |
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.
You can install the package via composer:
composer require appstract/laravel-dusk-safari
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()
);
}
Contributions are welcome, thanks to y'all :)
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.
The MIT License (MIT). Please see License File for more information.