Melodie Gauthier
Melodie Gauthier

Reputation: 715

Selenium InternetExplorerDriver Proxy C#

I need to execute tests on different proxy. For this, I set the InternetExplorerDriver this way:

        var options = new InternetExplorerOptions();
        Proxy proxy = new Proxy()
        {
            Kind = ProxyKind.Manual,
            HttpProxy = Globals.PROXY_IP + ":" + Globals.PROXY_HTTP_PORT.ToString(),
            SslProxy = Globals.PROXY_IP + ":" + Globals.PROXY_HTTPS_PORT.ToString(),
        };
        string[] bypassAddresses = new string[] { "*portalmail.qc", "*mailportal.qc"};
        proxy.AddBypassAddresses(bypassAddresses);
        options.Proxy = proxy;
        driver = new InternetExplorerDriver("./Resources", options, TimeSpan.FromMinutes(15));

The proxy ip : port are successfully set, but the Proxy Exception/Bypass (Do not use proxy server for addresses beginning with:) addresses are not set. I also tried to set Proxy.NoProxy (which is deprecated) but got same result. Both Proxy.BypassProxyAddresses and Proxy.NoProxy are set with addresses in bypassAddresses with semicolon between them but for some reason they are not in the IE options for proxy bypass

Upvotes: 1

Views: 257

Answers (1)

kuceb
kuceb

Reputation: 18079

Yes, that is a bug recently fixed in IE driver, see this GitHub PR: https://github.com/SeleniumHQ/selenium/pull/6483

Upvotes: 1

Related Questions