addArguments(collect([ $this->shouldStartMaximized() ? '--start-maximized' : '--window-size=1920,1080', ])->unless($this->hasHeadlessDisabled(), function (Collection $items) { return $items->merge([ '--disable-gpu', '--headless=new', ]); })->all()); return RemoteWebDriver::create( 'http://localhost:4444', DesiredCapabilities::chrome()->setCapability( ChromeOptions::CAPABILITY, $options ) ); } /** * Determine if the browser window should start maximized. */ protected function baseUrl() { return 'http://localhost:8000'; } }