diff --git a/cypress.config.ts b/cypress.config.ts index 02f4e853b..e50b8bea5 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -51,6 +51,13 @@ export default defineConfig({ return launchOptions; } + if (browser.name === 'chrome' && browser.isHeadless) { + const headlessIndex = launchOptions.args.indexOf('--headless'); + if (headlessIndex > -1) { + launchOptions.args[headlessIndex] = '--headless=new'; + } + } + // whatever you return here becomes the launchOptions return launchOptions; });