Support `chrome --headless`
See original GitHub issueChange 1.
With Chrome 63 coming out we can make some big changes at Cypress.
- We will be able to support the
debugger
protocol which will enable native events - 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:
- Created 6 years ago
- Reactions:155
- Comments:44 (10 by maintainers)
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.
Is Chrome headless support happening? If so, is there an approx. date of availability?