appstract / laravel-dusk-opera by gizburdt

Run Dusk tests in Opera
3,628
8
5
Package Data
Maintainer Username: gizburdt
Maintainer Contact: mail@appstract.nl (Olav van Schie)
Package Create Date: 2017-07-04
Package Last Update: 2020-03-26
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-04-18 15:10:20
Package Statistics
Total Downloads: 3,628
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 8
Total Watchers: 5
Total Forks: 1
Total Open Issues: 0

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:

composer require appstract/laravel-dusk-opera

Usage

Add the SupportsOpera trait to your DuskTestCase:

use Appstract\DuskDrivers\Opera\SupportsOpera;

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

Now you can start the server in the prepare method:

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

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

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

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.