项目作者: appstract

项目描述 :
Run Dusk tests in Opera
高级语言: PHP
项目地址: git://github.com/appstract/laravel-dusk-opera.git
创建时间: 2017-07-04T12:57:20Z
项目社区:https://github.com/appstract/laravel-dusk-opera

开源协议:MIT License

下载


Run Dusk tests in Opera

Latest Version on Packagist
Total Downloads
Software License
Build Status

This package allows you to use Opera Webdriver in Dusk, so you don’t need Selenium to run Dusk tests in Opera.

This requires a recent version of Opera.

Installation

You can install the package via composer:

  1. composer require appstract/laravel-dusk-opera

Usage

Add the SupportsOpera trait to your DuskTestCase:

  1. use Appstract\DuskDrivers\Opera\SupportsOpera;
  2. abstract class DuskTestCase extends BaseTestCase
  3. {
  4. use CreatesApplication, SupportsOpera;
  5. }

Now you can start the server in the prepare method:

  1. public static function prepare()
  2. {
  3. static::startOperaDriver();
  4. }

Instruct Dusk to use Opera by changing DesiredCapabilities::chrome()
to DesiredCapabilities::opera() in the Driver method:

  1. protected function driver()
  2. {
  3. return RemoteWebDriver::create(
  4. 'http://localhost:9515', DesiredCapabilities::opera()
  5. );
  6. }

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.