How to switch off "Use Proxy server for your LAN" in chrome | Selenium Forum
M
Posted on 06/09/2016
Sir,
[b:vja7xnh1]Pls refer attachment. I need to uncheck this "Use Proxy server for your LAN" in chrome browser via Selenium code.[/b:vja7xnh1]
This setting is at chromebrowser>Settings>Show advanced Settings>Change Proxy Settings>LAN settings>
"Use proxy server for your LAN."

Have referred :
http://stackoverflow.com/questions/33009300/how-to-turn-off-the-proxy-settings-on-chrome-browser-through-selenium-webdriver

Tried following :
1>options.addArguments("--no-proxy-server");//------>does not uncheck proxy server settings. It is disabling "change Proxy Settings" button under Networks.

2>Proxy proxy=startProxy();//------------------------------------>This StartProxy pops error as notvalid method
proxy.setProxyType(ProxyType.MANUAL);
proxy.setNoProxy("");
ChromeOptions options = new ChromeOptions();
DesiredCapabilities dc = DesiredCapabilities.chrome();
dc.setCapability(CapabilityType.PROXY, proxy);
System.setProperty("webdriver.chrome.driver",sChromeDriverPath);
dc.setCapability(ChromeOptions.CAPABILITY, options);
WebDriver driver = new ChromeDriver(dc);

3>Proxy proxy=new Proxy();
proxy.setProxyType(ProxyType.MANUAL); ///------------------->Error ProtoType is manual.But no manual prototype mentioned.
proxy.setNoProxy("");
ChromeOptions options = new ChromeOptions();
DesiredCapabilities dc = DesiredCapabilities.chrome();
dc.setCapability(CapabilityType.PROXY, proxy);
System.setProperty("webdriver.chrome.driver",sChromeDriverPath);
dc.setCapability(ChromeOptions.CAPABILITY, options);
WebDriver driver = new ChromeDriver(dc);

4> https://groups.google.com/forum/#!msg/selenium-users/38gUPQ6-yN4/Il6ewuI60RAJ

Tried code specific for chrome browser & general code-------> neither of them uncheck proxy server settings. It is disabling "change Proxy Settings" button under Networks.

Please suggest sir.......