FirefoxDriver not honoring proxy settings

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

FirefoxDriver not honoring proxy settings

Donald Raikes
I am using selenium 3.12 with python 2.7.5 on oraclelinux 7.4 with firefox 52.0.

When I configure my wbdriver using the following code, I expect that
all traffic I run through selenium will be sent to my proxy, but after
running a variety of tests, when I check the proxy no traffic has been
received although all the browser tests have completed successfully.

Code to configure my webdriver is as follows:
import logging
import os
import sys
from time import sleep

import selenium
from selenium import webdriver
from selenium.webdriver.common.proxy import Proxy, ProxyType
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

def FirefoxWithProxy():
    """ Return the selenium Firefox webdriver configured to use as a proxy.  """"Configuring FirefoxDriver with as a proxy")
    myProfile = "/home/draikes/secauto/profile"
    profile = webdriver.FirefoxProfile(myProfile)
    profile.set_preference("network.proxy.type", 1) # manual proxy
    profile.set_preference("network.proxy.http", proxyHost)
    profile.set_preference("network.proxy.http_port", proxyPort)
    profile.set_preference("network.proxy.ssl", proxyHost)
    profile.set_preference("network.proxy.ssl_port", proxyPort)
(X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0")
    cap = DesiredCapabilities().FIREFOX
    cap["marionette"] = False
    return driver


The proxy is OWASP Zed Attack Proxy (zap) which I am using for
security testing my web application.

any help would be appreciated.


You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit
For more options, visit