I inherited some java-based selenium tests, and have been tasked with running them against a secured site. The scripts are work fine when the site is not secured.

When I run the tests against the secured site I get an error saying that there ris a handshake exception. I assumed that the problem is that Firefox is not accepting the site certificates.

I used openssl to download the site's ssl certificate and used certutil (on linux) to add the certificate to the cert8.db in the Firefox profile I configured for this testing.

However even after adding the certificate I am still getting the same handshake exception. I wonder if Firefox is not using the profile I specified for the testing.

Is there any way to determine which profile Firefox is using for a selenium test?

BTW: the profiles.ini file for firefox has "default=1" for the profile I wish to use.

  • 1
    You should add the code that produces the exception and the exception itself with a stacktrace.
    – Alexey R.
    Commented May 17, 2018 at 10:05

2 Answers 2


You should add the Firefox profile you want when creating the webdriver instance. There is a constructor for that. That way you don't have to check for the profile later. Or is there a good reason to do otherwise?


Usually the remote end of the webdriver creates a new profile while creating a new session unless specified. If you are using a custom profile, then you must be passing the instance of the profile as an argument to the driver object.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.