Search code examples
node.jstestingautomated-testschromiumpuppeteer

Pass the "Your connection is not private" page in Chromium


I encounter this problem when I try to do the testing with Chromium and Jest, but there is a problem that I cannot make the Chromium instance to pass the "Your connection is not private" page and do what I want.

Look like this: screenshot

I tried the solution that works on Chrome, by setting like this:

Screenshot2

But this setting doesn't make any sense on chromium, for it cannot keep, every time when I try to restart the test, it automatically back to the default setting again.

Appreciate to the help of any kinds.


Solution

  • If you're starting the browser via puppeteer.launch, then you can specify HTTPS errors by this configuration:

    const browser = await puppeteer.launch({ ignoreHTTPSErrors: true });
    

    This should alleviate the issue you're encountering. I found the docs for this here helpful.