To hide console errors add this to the arguments but it depends on the Chrome version you are running.
'--log-level=3',
'--silent'
Summer Sale! All accounts are 50% off this week.
I want to preserve console logs, but not this
DevTools listening on ws://127.0.0.1:60060/devtools/browser/63524023-c3d1-4db5-a823-b4d8f52a5bfd
So I am tried to add an option to disable extensions in tests/DuskTestCase.php
protected function driver()
{
$options = (new ChromeOptions)->addArguments([
'--disable-gpu',
'--headless',
'--window-size=1920,1080',
'--ignore-certificate-errors',
'--ignore-ssl-errors',
'--disable-extensions',
]);
return RemoteWebDriver::create(
$_ENV['DUSK_DRIVER_URL'] ?? 'http://localhost:9515',
DesiredCapabilities::chrome()->setCapability(
ChromeOptions::CAPABILITY, $options
)
);
}
Note
--disable-extensions
When I run php artisan dusk, anyway, it shos me the console.log about DevTools.
Please or to participate in this conversation.