Reputation: 23
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:
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.
Upvotes: 2
Views: 2379
Reputation: 371
const browser = await puppeteer.launch({ ignoreHTTPSErrors: true, headless: false, timeout: 0 });
This worked for me
Upvotes: 0
Reputation: 2132
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.
Upvotes: 4