Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8183931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:19:29+00:00 2026-06-07T01:19:29+00:00

Is it possible to test client side SSL certificates with Selenium and any browser?

  • 0

Is it possible to test client side SSL certificates with Selenium and any browser? E.g. Can you create a web driver and give dummy certificates for it? Or use a prepared Firefox profile?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T01:19:31+00:00Added an answer on June 7, 2026 at 1:19 am

    Creating Selenium Firefox test profile for SSL client-side certificates

    You need to prepare Selenium’s WebDriver Firefox profile which has client certificates imported in.

    First you launch WebDriver with the following configuration in your test code:

    # Pre-seeded Firefox profile directory
    profile_directory = os.path.join(os.path.dirname(__file__), "..", "..", "certs", "firefox-client-ssl-profile")
    self.assertTrue(os.path.exists(profile_directory))
    
    profile = FirefoxProfile(profile_directory)
    
    # Make sure the client side certificate selection does not interrupt the test
    # XXX: What happens in other language versions?
    profile.set_preference("security.default_personal_cert", "Select Automatically")
    self.driver = WebDriver(firefox_profile=profile)
    
    self.selenium_helper = SeleniumHelper(self, self.driver)
    self.selenium_helper.driver = self.driver
    

    Start unit tests and drive them to the point Zope test server is up.
    Stop tests with “import pdb ; pdb.set_trace()”

    You should now have a Selenium’s “WebDriver” Firefox instance on your screen.

    Import your client side certificate. Preferences > Advanced > Encryption > View certificates.
    Import “client.p12” from your client-side certificate supply.

    Visit in the URL triggering the client-side certificate dialog in Webdriver’s Firefox::

        https://yourservevr/triggers-client-side-certificate-ssl-handshake
    

    This should prompt you to accept the client side certificate against the test server.
    Accept everything manually.

    Visit in menu Help > Troubleshooting Information > Application Basics > Show in Finder.
    This opens the temporary directory holding Webdriver’s active profile files.

    Copy Firefox profile files cert8.db and key3.db to your unit test package
    WebDriver’s Firefox profile’s seed folder. This is the folder where Selenium picks seeds for
    Firefox web driver when the test starts firefox-client-ssl-profile.

    Interrupt the tests. Restart the tests. Run until the pause again. In Webdriver’s Firefox
    see in the settings that it now contains the certificates you did approve on the last run
    in Preferences > Advanced > Encryption > View certificates.

    More info

    • https://trac.macports.org/wiki/howto/MAMP

    • https://support.mozilla.org/en-US/questions/824255

    • http://wiki.apache.org/httpd/DebuggingSSLProblems#Finding_out_what_caused_a_handshake_to_fail

    • http://www.openssl.org/docs/apps/s_client.html

    • https://omni.tenderapp.com/kb/omni-certificate-authorities/importing-pkcs12-certificates-in-keychain-for-safarichrome-in-mac-os-x

    • http://support.mozilla.org/en-US/kb/Recovering%20important%20data%20from%20an%20old%20profile#w_security-certificate-settings
      “””

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It is possible to define (client-side): now.function = function(){console.log('test');} ... that is called by
Possible Duplicate: Interesting test of Javascript RegExp Regular expression test can't decide between true
Is it possible to conveniently test jQuery selectors on some random web page using
I'm trying to create an in-process unit test for my service to client interactions
Is it possible to save the files retrieved by WGET to the client side
Is it possible to test for multiple exceptions in a single JUnit unit test?
Is it possible to test for enum equality in JSF? E.g. where stuff is
Is it possible to JUnit test if wiring by Spring is succesfully? I would
Possible Duplicate: How do I test for an empty Javascript object from JSON? var
Possible Duplicate: Calling Python from JavaScript I have a test.py and test.js . I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.