title: How to handle SSL certificate in browser-mob proxy using selenium python
body: <p>I need to handle the SSL certificate in browser-mob proxy so that secured connection can be established whenever URL starts with https. I tried many methods to handle the SSL certificate, but it is showing the unsecured connection.</p>
  
  <pre><code>from selenium import webdriver
  import requests
  import time
  from browsermobproxy import Server
  from selenium import webdriver
  import os
  from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
  
  
  server = Server("/home/Downloads/browsermob-proxy-2.1.4-bin/browsermob-proxy-2.1.4/bin/browsermob-proxy")
  server.start()
  proxy = server.create_proxy(params={'trustAllServers':'true'})
  chromeOptions = webdriver.ChromeOptions()
  chromeOptions.add_argument("--proxy-server={0}".format(proxy.proxy))
  r = requests.post('http://localhost:8080/proxy', data = {'trustAllServers':'true'})
  capabilities = webdriver.DesiredCapabilities().CHROME
  capabilities['acceptInsecureCerts'] = True
  driver = webdriver.Chrome(chrome_options=chromeOptions, 
  desired_capabilities=capabilities)
  proxy.new_har("test",options={'captureHeaders': True})
  driver.get("https://stackoverflow.com")
  driver.close()
  </code></pre>