title: How to use browsermob with python-selenium behind a corporate proxy?
body: <p>My test environment is under a corporate proxy ("<strong>proxy.ptbc.std.com:2538</strong>").I want to open a particular video on YoTube for a period of time (eg 200 seconds) and capture the har file for each visit, the process is repeated several times for a massive test. I have tried different examples found here but the firefox / chrome browsers do not connect to the internet because they are behind the proxy.</p>
  
  <p>How can run "python-selenium + browsermobproxy" behind a corporate proxy and capture the har file for each instance.</p>
  
  <p>Example code:</p>
  
  <pre><code> from browsermobproxy import Server
      server = Server("C:\\Utility\\browsermob-proxy-2.1.4\\bin\\browsermob-proxy")
      server.start()
      proxy = server.create_proxy()
  
      from selenium import webdriver
      profile  = webdriver.FirefoxProfile()
      profile.set_proxy(proxy.selenium_proxy())
      driver = webdriver.Firefox(firefox_profile=profile)
  
  
      proxy.new_har("google")
      driver.get("http://www.google.co.in")
      proxy.har # returns a HAR JSON blob
  
      server.stop()
      driver.quit()
  </code></pre>
  
  <p>Any help would be appreciated</p>