Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
DuskTestCase.php
<?php
...
protected function driver()
{
$options_array = env('TRAVIS', false) ? ['--disable-gpu','--headless','--window-size=1100,600'] : [];
$options = (new ChromeOptions)->addArguments($options_array);
return RemoteWebDriver::create(
env('CHROME_HOST', 'http://selenium:4444/wd/hub'), DesiredCapabilities::chrome()->setCapability(
ChromeOptions::CAPABILITY, $options
)
);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment