Skip to content
CodeKruPro

Open a test site with an invalid SSL certificate (Python)

QuizMediumPython onlyAsked in: Infosys

The QA site uses a self-signed certificate (a certificate the site made for itself, so browsers do not trust it) and Chrome shows a privacy error. How do you let the test continue in Selenium Python?

  • Set opts.accept_insecure_certs = True on the browser options before starting the driver
  • Click Advanced and Proceed on the error page in every test
  • Turn off certificate checks for the whole machine
  • Call driver.ignore_ssl()

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in