'load_cert_chain in Chomedriver - Selenium - Python
I need to connect to a website that requires digital certificate authentication, when i try to connect with selenium, it open up a pop up asking to choose the certificate.
This pop is a OS operation, so it cant be controled by selenium
I'm trying to configure a connection so it can automatically authenticate with the certificate, but it's not working
python has a function "load_cert_chain", and I think it can be used to solve this problem, this is how I'm trying to use it
import http.client
import ssl
from selenium import webdriver
certificate_file = 'cert.pem'
certificate_secret= 'key.pem'
host = 'example.com'
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
context.load_cert_chain(certfile=certificate_file, keyfile=certificate_secret)
connection = http.client.HTTPSConnection(host, port=443, context=context)
driver = webdriver.Chrome()
driver.get("example.com")
I think i'm missing including the connection in the options of chrome driver, but I can't find the right way to make that
driver.get("example.com")
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
