diff --git a/README.md b/README.md index a97c858fc..eb166e1ff 100644 --- a/README.md +++ b/README.md @@ -644,12 +644,13 @@ ignoreHTTPSErrors: true, headless: ``` -You can add more settings (or override the defaults) with the engineOptions property. (properties are merged) +You can add more settings (or override the defaults) with the engineOptions property. (properties are merged). This is where headless mode can also be set to 'new', until "new headless mode" is the default in Puppet/Playwright. ```json "engineOptions": { "ignoreHTTPSErrors": false, "args": ["--no-sandbox", "--disable-setuid-sandbox"], + "headless": "new", "gotoParameters": { "waitUntil": "networkidle0" }, } ``` diff --git a/core/util/runPlaywright.js b/core/util/runPlaywright.js index 3018bae24..9153e19a1 100644 --- a/core/util/runPlaywright.js +++ b/core/util/runPlaywright.js @@ -36,7 +36,7 @@ module.exports.createPlaywrightBrowser = async function (config) { const playwrightArgs = Object.assign( {}, { - headless: !config.debugWindow + headless: config.debugWindow ? false : config?.engineOptions?.headless || true }, config.engineOptions ); diff --git a/core/util/runPuppet.js b/core/util/runPuppet.js index d513fa918..38bc4dcad 100644 --- a/core/util/runPuppet.js +++ b/core/util/runPuppet.js @@ -71,7 +71,7 @@ async function processScenarioView (scenario, variantOrScenarioLabelSafe, scenar {}, { ignoreHTTPSErrors: true, - headless: !config.debugWindow + headless: config.debugWindow ? false : config?.engineOptions?.headless || true }, config.engineOptions );