I'm having trouble with making IE use proxy pac file. But it works ok with Firefox and Chrome.

What I do:

1) Prepare proxy config

proxyPacFile = "file:///" + proxyPacFile;

Proxy proxyPAC = new Proxy();

2) Set proxy config to capabilities:

capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
capabilities.setCapability(InternetExplorerDriver.IE_USE_PRE_PROCESS_PROXY, true);              
capabilities.setCapability(CapabilityType.PROXY, proxyPAC); 

3) Then start RemoteWebDriver with that capabilities

And it doesn't work for IE. In connection settings I can see that address to file is correct, but IE doesn't open any page. Meanwhile in Firefox and Chrome everything works ok. Here's how I set capabilities for them:

    case CHROME:                
        capabilities = DesiredCapabilities.chrome();                
        capabilities.setCapability(CapabilityType.PROXY, proxyPAC);             

    case FIREFOX:
        capabilities = DesiredCapabilities.firefox();

        FirefoxProfile profile = new FirefoxProfile();              
        profile.setPreference("network.proxy.type", 2); 
        capabilities.setCapability(FirefoxDriver.PROFILE, profile);

        capabilities.setCapability(CapabilityType.PROXY, proxyPAC);             

Do I need some extra capability for IE?

1 Answer 1


As it turned out, Internet Explorer 11 disable to read pac file pointing to them as a file:///. The problem solved by transferring the file to an internal Web server and pointing to it as http link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.