@@ -68,7 +68,7 @@ protected function configureDownloadPath($browser, $path)
68
68
public static function prepare ()
69
69
{
70
70
if (!static ::runningInSail ()) {
71
- static ::startChromeDriver ();
71
+ static ::startChromeDriver ([ ' --port=9515 ' ] );
72
72
}
73
73
}
74
74
@@ -94,41 +94,19 @@ protected function driver()
94
94
{
95
95
$ options = (new ChromeOptions )->addArguments (collect ([
96
96
$ this ->shouldStartMaximized () ? '--start-maximized ' : '--window-size=1920,1080 ' ,
97
- '--force-color-profile=srgb ' ,
98
- '--force-device-scale-factor=2 ' ,
97
+ '--disable-search-engine-choice-screen ' ,
99
98
])->unless ($ this ->hasHeadlessDisabled (), function ($ items ) {
100
99
return $ items ->merge ([
101
100
'--disable-gpu ' ,
102
- '--headless ' ,
101
+ '--headless=new ' ,
103
102
]);
104
103
})->all ());
105
104
106
105
return RemoteWebDriver::create (
107
106
$ _ENV ['DUSK_DRIVER_URL ' ] ?? 'http://localhost:9515 ' ,
108
107
DesiredCapabilities::chrome ()->setCapability (
109
- ChromeOptions::CAPABILITY ,
110
- $ options
111
- )
108
+ ChromeOptions::CAPABILITY , $ options
109
+ )->setCapability ('goog:loggingPrefs ' , ['browser ' => 'ALL ' ])
112
110
);
113
111
}
114
-
115
- /**
116
- * Determine whether the Dusk command has disabled headless mode.
117
- *
118
- * @return bool
119
- */
120
- protected function hasHeadlessDisabled ()
121
- {
122
- return isset ($ _SERVER ['DUSK_HEADLESS_DISABLED ' ]) || isset ($ _ENV ['DUSK_HEADLESS_DISABLED ' ]);
123
- }
124
-
125
- /**
126
- * Determine if the browser window should start maximized.
127
- *
128
- * @return bool
129
- */
130
- protected function shouldStartMaximized ()
131
- {
132
- return isset ($ _SERVER ['DUSK_START_MAXIMIZED ' ]) || isset ($ _ENV ['DUSK_START_MAXIMIZED ' ]);
133
- }
134
112
}
0 commit comments