Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/web/webdriver/capabilities/acceptinsecurecerts/index.md
6540 views
---
title: acceptInsecureCerts slug: Web/WebDriver/Capabilities/acceptInsecureCerts
---

{{QuickLinksWithSubpages("/en-US/docs/Web/WebDriver/Capabilities")}}

The acceptInsecureCerts capability communicates whether expired or invalid TLS certificates are checked when navigating. When the capability is false, an insecure certificate error will be returned as navigation encounters domains with certificate problems. 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