appstract/laravel-dusk-safari 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

appstract/laravel-dusk-safari

最新稳定版本:1.0.0

Composer 安装命令:

composer require --dev appstract/laravel-dusk-safari

包简介

Run Dusk tests on Safari

README 文档

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.

统计信息

  • 总下载量: 6.75k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 4
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-07-03