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() { $app_url = config('app.url'); $port = config('app.port'); return $app_url.':'.$port; } }