1

I'm trying to configure my FirefoxDriver to use automatic proxy configuration URL. I am failing to do so.

My code looks like this:

FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("network.proxy.type", 2);
profile.setPreference("network.proxy.autoconfig_url", "http://10.203.193.52/Proxy-cmv.pac");
WebDriver driver = new FirefoxDriver();

I am not receiving any kind of errors but the connection is not working for this browser. When checking Options > Advanced > Network > Connection Settings from Firefox menu, proxy is set to "Use system proxy".

1 Answer 1

4

You need to use that profile, because now you just create it.

So, change:

WebDriver driver = new FirefoxDriver();

to

WebDriver driver = new FirefoxDriver(profile);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.