Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] Use --headless=new #1027

Merged
merged 1 commit into from
Feb 21, 2023
Merged

[7.x] Use --headless=new #1027

merged 1 commit into from
Feb 21, 2023

Conversation

SjorsO
Copy link
Contributor

@SjorsO SjorsO commented Feb 21, 2023

As of Chrome version 109, there is a new and improved headless mode that can be enabled with --headless=new. It is described in more detail in this Selenium blog post and this StackOverflow comment.

The --headless=new flag also fixes a breaking change in Chromedriver where setting a custom download directory stopped working. I was using the code below to set a custom download directory:

$options->setExperimentalOption('prefs', [
    'download.default_directory' => storage_path('app/dusk-downloads'),
]);

This stopped working recently and caused my tests to fail, but setting --headless=new fixed it.

@taylorotwell taylorotwell merged commit c1d1726 into laravel:7.x Feb 21, 2023
@crynobone
Copy link
Member

@SjorsO Would there be any issue if we run --headless=new on Chrome version lower than 109? Locally you may be running the latest version but CI environment may still be using an older version.

@SjorsO
Copy link
Contributor Author

SjorsO commented Feb 22, 2023

@SjorsO Would there be any issue if we run --headless=new on Chrome version lower than 109? Locally you may be running the latest version but CI environment may still be using an older version.

I'm not sure, my Chrome is already past version 109 so I can't test it. But since this change only affects new installs of Dusk, and since Chrome auto-updates, I don't think it will be a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants