【问题标题】:Selenium InternetExplorerDriver Proxy C#Selenium InternetExplorerDriver 代理 C#
【发布时间】:2019-01-22 16:46:40
【问题描述】:

我需要在不同的代理上执行测试。为此,我这样设置 InternetExplorerDriver:

        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));

代理 ip : 端口已成功设置,但未设置代理例外/绕过(不要对以:开头的地址使用代理服务器)地址。我还尝试设置 Proxy.NoProxy (已弃用)但得到了相同的结果。 Proxy.BypassProxyAddresses 和 Proxy.NoProxy 都设置了 bypassAddresses 中的地址,它们之间有分号,但由于某种原因,它们不在代理绕过的 IE 选项中

【问题讨论】:

    标签: selenium internet-explorer proxy


    【解决方案1】:

    是的,这是 IE 驱动程序中最近修复的一个错误,请参阅此 GitHub PR: https://github.com/SeleniumHQ/selenium/pull/6483

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-03-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多