AutomatedTester / browsermob-proxy-py

A python wrapper for Browsermob Proxy
http://oss.theautomatedtester.co.uk/browsermob-proxy-py
236 stars 104 forks source link

Problem with SSL certificate #21

Closed pyself closed 10 years ago

pyself commented 10 years ago

Hi. I am trying to connet to twitter.com with selenium and browsermobproxy but I keep getting the untrusted connection error and I can't get over it. I simply copy your code from the readme. It works fine but it looks like there are problems with ssl certificate with some sites not only twitter.

from browsermobproxy import Server
server = Server("path/to/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("twitter")
driver.get("https://twitter.com")
proxy.har # returns a HAR JSON blob

server.stop()
driver.quit()
pyself commented 10 years ago

Found a more elegant solution. As I was interested only in the HAR file I decide to drop browsermobproxy and follow this approach:

http://www.softwareishard.com/blog/firebug/automate-page-load-performance-testing-with-firebug-and-selenium/

AutomatedTester commented 10 years ago

@pyself I thought I had replied to this so let me apologize first!

There has been issues with Browsermob Proxy and SSL so I think you might have hit it. I am going to close this and you can watch #19 which I think is the same issue.