Skip to content

Instantly share code, notes, and snippets.

@ignaciojonas
Created November 1, 2017 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ignaciojonas/6165b1043a821b33d2de74ec6fd56e8f to your computer and use it in GitHub Desktop.
Save ignaciojonas/6165b1043a821b33d2de74ec6fd56e8f to your computer and use it in GitHub Desktop.
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