Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome options Proxy Bypass List not working

I've been trying to add arguments to my Chrome Options to use a proxy and to ignore certain URL's.

I've followed the documentation and am trying to run this very simple test:

@Test
public void myTest(){
    ChromeOptions options = new ChromeOptions();
    options.addArguments("--proxy-server=http://XXX.XX.XX.XX:8080");
    options.addArguments("--proxy-bypass-list=http://www.google.com");
    System.setProperty("webdriver.chrome.driver", "C:/drivers/chromeDriver/win/chromedriver.exe");
    ChromeDriver driver = new ChromeDriver(options);
    driver.get("http://www.google.com");
}

}

I've also tried with the variation:

options.addArguments("--proxy-bypass-list=*");

But it won't open the URL, is there something I'm doing wrong?

like image 360
ChrisG29 Avatar asked Sep 13 '25 20:09

ChrisG29


1 Answers

I guess you should use chromedriver.exe instead of eclipse.exe while setting property and make sure you have compatible chromedriver as per current version available in your system.

Here we go :

ChromeOptions options = new ChromeOptions();
options.addArguments("--proxy-server=http://XXX.XX.XX.XX:8080");
options.addArguments("--proxy-bypass-list=https://www.google.com");
System.setProperty("webdriver.chrome.driver", "driver_location\\chromedriver.exe");
ChromeDriver driver = new ChromeDriver(options);
driver.get("https://www.google.com");
like image 78
NarendraR Avatar answered Sep 15 '25 14:09

NarendraR