NimaSoroush / differencify

Differencify is a library for visual regression testing
MIT License
634 stars 46 forks source link

https ssl cert error #122

Closed dalau6 closed 5 years ago

dalau6 commented 5 years ago

I can't goto a site with bad ssl certs. This is the error I get: NET::ERR_CERT_COMMON_NAME_INVALID Is there a way to bypass this?

NimaSoroush commented 5 years ago

Hi @dalau6,

Yes, you should pass ignoreHTTPSErrors: true to browser launch step. example:

(async () => {
  const result = await differencify
    .init()
    .launch({ ignoreHTTPSErrors: true })
    .newPage()
    .setViewport({ width: 1600, height: 1200 })
    .goto('https://github.com/NimaSoroush/differencify')
    .waitFor(1000)
    .screenshot()
    .toMatchSnapshot()
    .result((result) => {
      console.log(result);
    })
    .close()
    .end();
})();

Hope this helps