acceptInsecureCerts

Jump to:

The acceptInsecureCerts capability communicates whether expired or invalid TLS certificates are checked when navigating. If the capability is false, an insecure certificate error will be returned. Otherwise self-signed or otherwise invalid certificates will be implicitly trusted by the browser on navigation. The capability has effect for the lifetime of the session.

Example

Using the acceptInsecureCerts capability you can bypass, or implicitly trust, TLS certificates that the certificate service in the browser does not trust:

from selenium import webdriver
from selenium.common import exceptions

session = webdriver.Firefox(capabilities={"acceptInsecureCerts": True})
session.get("https://self-signed.badssl.com/")
print(session.current_url)

Output:

https://self-signed.badssl.com/

 

See also

Document Tags and Contributors

Contributors to this page: ato
Last updated by: ato,