Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12231

AttributeError: 'FirefoxProfile' object has no attribute 'set_proxy'

$
0
0

Hi I'm trying to run this:

from browsermobproxy import Serverserver = Server('path')server.start()proxy = server.create_proxy()from selenium import webdriverprofile = 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")server.stop()driver.quit()

But I'm getting this:AttributeError: 'FirefoxProfile' object has no attribute 'set_proxy'

I'm not sure why but everywhere I look people use profile.set_proxy(proxy.selenium_proxy())


Viewing all articles
Browse latest Browse all 12231

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>