Run Dusk tests in Opera
, (*1)
This package allows you to use Opera Webdriver in Dusk, so you don't need Selenium to run Dusk tests in Opera., (*2)
This requires a recent version of Opera., (*3)
Installation
You can install the package via composer:, (*4)
``` bash
composer require appstract/laravel-dusk-opera, (*5)
## Usage
Add the ``SupportsOpera`` trait to your DuskTestCase:
```php
use Appstract\DuskDrivers\Opera\SupportsOpera;
abstract class DuskTestCase extends BaseTestCase
{
use CreatesApplication, SupportsOpera;
}
Now you can start the server in the prepare method:, (*6)
public static function prepare()
{
static::startOperaDriver();
}
Instruct Dusk to use Opera by changing DesiredCapabilities::chrome()
to DesiredCapabilities::opera() in the Driver method:, (*7)
protected function driver()
{
return RemoteWebDriver::create(
'http://localhost:9515', DesiredCapabilities::opera()
);
}
Contributing
Contributions are welcome, thanks to y'all :), (*8)
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., (*9)
License
The MIT License (MIT). Please see License File for more information., (*10)