Package Data | |
---|---|
Maintainer Username: | inxilpro |
Package Create Date: | 2017-08-30 |
Package Last Update: | 2020-05-04 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-15 15:04:25 |
Package Statistics | |
---|---|
Total Downloads: | 7,593 |
Monthly Downloads: | 18 |
Daily Downloads: | 2 |
Total Stars: | 6 |
Total Watchers: | 3 |
Total Forks: | 3 |
Total Open Issues: | 1 |
First, install the composer package:
composer require galahad/dusk-browserstack
Update your DuskTestCase:
<?php
namespace Tests;
use Galahad\BrowserStack\SupportsBrowserStack;
abstract class DuskTestCase extends BaseTestCase
{
// Add this:
use SupportsBrowserStack;
public static function prepare()
{
// This is no longer needed:
// static::startChromeDriver();
}
protected function driver()
{
// Set up the browser stack driver as needed
return $this->createBrowserStackDriver(/* $config */);
}
}
Set these in the driver()
call or in the services.browserstack
config. The key
option
can be omitted if you have a BROWSERSTACK_ACCESS_KEY
environmental variable set.
username
: [required] your BrowserStack usernamekey
: [required] your BrowserStack API keylocal_config
: array of options to pass to BrowserStackLocal
capabilities
: array of default capabilities to request (defaults to Chrome on any available platform)It's possible to call setBrowserStackLocalConfig
or setBrowserStackCapabilities
within your tests,
and each new call to driver()
will use the updated settings. You can use this to run different tests
on different browsers/platforms/etc.
services.browserstack
by default for less boilerplate.