Automatically have browser extension applied on Cypress.io

Viewed 194

I'm currently adding a browser extension through a folder like so:

module.exports = (on, config) => {
  on('before:browser:launch', (browser, launchOptions) => {

    const extensionFolder = 'some/local/path';

    if (browser.family === 'chromium'){
      launchOptions.args.push(`--load-extension=${extensionFolder}`)

      return launchOptions
    }

  })
}

which works fine, the extension is loaded onto the browser.

Is there a way to have it automatically running as well from the start, not just loaded on?

If that makes sense ...

0 Answers
Related