Navigation Menu

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

Fixes/new headless mode in chrome #3581

Merged

Conversation

gravityvi
Copy link
Member

Changes

  • changed headless argument for chrome to --headless=new from --headless=chrome according to the recent change in chrome. For more details refer this issue

@@ -328,7 +328,7 @@ module.exports = class SeleniumCapabilities {

addHeadlessOption({options}) {
if (this.argv.headless && (options instanceof Capabilities) && (this.isChrome || options.headless)) {
this.isChrome ? options.addArguments('headless=chrome') : options.headless();
this.isChrome ? options.addArguments('headless=new') : options.headless();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the older versions of Chrome browser? Would --headless=new work with them as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no way to detect the version of the chrome browser before the driver creation. And people using older version of chrome will likely be using older version of nightwatch

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should tag this as a breaking change

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we can also detect the version of chromedriver, right? Since chromedriver version == chrome version.
(Of course, only if it is worth doing. But I guess we can also pass the --headless=chrome argument directly in desired capabilities and it will work for older chrome versions?)

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.

None yet

4 participants