question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support `chrome --headless`

See original GitHub issue

Change 1.

With Chrome 63 coming out we can make some big changes at Cypress.

  1. We will be able to support the debugger protocol which will enable native events
  2. We will be able to support chrome --headless

The reason we currently do not support chrome --headless is because Chrome does not support extensions in that mode. We use an extension to automate the browser and that’s why its a no-go. By switching from the extension to the debugger protocol, we’ll be able to get around this.

Change 2.

Once we support chrome headless I propose the following changes to the CLI:

cypress run

Currently cypress run will launch Electron headlessly. This is confusing for users because they can’t see what’s going on and because they don’t read our docs they don’t understand that we’re launching Electron instead of Chrome. Due to the browser version differences, they see failures in Electron that aren’t happening in Chrome.

What I propose is to change this behavior so that cypress run by default will search for Chrome and launch it in headed mode. When no Chrome is installed, it’ll fall back to Electron.

Currently we support a --headed option that only applies to Electron. This was done to prevent breaking changes.

This should now switch to being the default but then enabling the user to explicitly opt into the --headless mode for both Electron + Chrome.

This will be a breaking change and could come out in Cypress 2.x.x.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:155
  • Comments:44 (10 by maintainers)

github_iconTop GitHub Comments

76reactions
bahmutovcommented, Mar 11, 2019

Cypress team update

We have investigated headless Chrome support. To support executing commands and capture the video of the test run, we must go through the Debugger protocol. Thus we will support headless Chrome after landing native events #311 which is in progress.

76reactions
jfbrennancommented, Jan 23, 2019

Is Chrome headless support happening? If so, is there an approx. date of availability?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Started with Headless Chrome - Chrome Developers
Windows support came in Chrome 60. # Starting Headless (CLI). The easiest way to get started with headless mode is to open the...
Read more >
Headless Chromium
Headless Chromium allows running Chromium in a headless/server environment. Expected use cases include loading web pages, extracting metadata (e.g., ...
Read more >
What is Google Chrome Headless Mode - Debug Bar
The Headless mode is a feature which allows the execution of a full version of the Chrome Browser. It provides the ability to...
Read more >
The Beginner's Guide to Chrome Headless
The major advantage of using Headless Chrome is that users can write script to run the browser programmatically, doing tasks like scraping, analyzing,...
Read more >
706008 - Extensions support in headless Chrome - Monorail
Headless mode doesn't currently support extensions, and it's not clear whether we can support them easily -- although we are doing some ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found