So everything works
fp = webdriver.FirefoxProfile()
fp.set_preference("network.proxy.type", 1)
fp.set_preference("network.proxy.http", PROXY_HOST)
fp.set_preference("network.proxy.http_port", int(PROXY_PORT))
fp.update_preferences()
driver = webdriver.Firefox(firefox_profile=fp)
But if the driver has already been created, the proxy can not install. It does not work
driver = webdriver.Firefox()
driver.profile.set_preference("network.proxy.type", 1)
driver.profile.set_preference("network.proxy.http", PROXY_HOST)
driver.profile.set_preference("network.proxy.http_port", int(PROXY_PORT))
driver.profile.update_preferences()
And so, too.
driver = webdriver.Firefox()
driver.firefox_profile.set_preference("network.proxy.type", 1)
driver.firefox_profile.set_preference("network.proxy.http", PROXY_HOST)
driver.firefox_profile.set_preference("network.proxy.http_port", int(PROXY_PORT))
driver.firefox_profile.update_preferences()
Why? Can not understand. I'm doing something wrong?