I am trying to run automated API tests on localhost with an invalid cert.

Is there a chromeOption equivalent to "Proceed Anyway" that I can pass to the tests so they can get a response from the url?

Right now I am manually testing the API via Postman (after using Proceed Anyway in Chrome), so the API itself does work, but the automation cannot get a response.

2 Answers 2


This is works for me (in python):

from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ["ignore-certificate-errors"])
webdriver_instance = webdriver.Chrome(chrome_options=options)

See also: https://stackoverflow.com/questions/24507078/how-to-deal-with-certificates-using-selenium and https://stackoverflow.com/questions/24168407/unsupported-command-line-flag-ignore-certificate-errors


As this is tagged with protractor, this is how you allow "unsecure HTTPS" via Protractor config:

In case of Firefox:

capabilities: { 
  browserName: 'firefox', 
  marionette: true, 
  acceptInsecureCerts: true

In case of Chrome (not tested and may not work as is, https://github.com/angular/protractor/issues/847):

capabilities: { 
  browserName: 'chrome', 
  chromeOptions: {
    args: ['--ignore-certificate-errors']

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.