RE: –ignore-certificate-errors —- when running in Chrome

Answered

When I open my app in Chrome I get:

“You are using an unsupported command-line flag: –ignore-certificate-errors. Stability and security will suffer”

My scripts seem to run fine but I would like to try and get rid of this message.

My chrome drive code is:

System.setProperty(“webdriver.chrome.driver”,“C:/drivers/chromedriver.exe”);driver = new ChromeDriver();

Add Comment
4 Answers

This worked for me:


System.setProperty("webdriver.chrome.driver", "C:/drivers/chromedriver.exe");

DesiredCapabilities capabilities = DesiredCapabilities.chrome();

capabilities.setCapability("chrome.switches", Arrays.asList("--incognito"));

ChromeOptions options = new ChromeOptions();

options.addArguments("--test-type");

capabilities.setCapability("chrome.binary","C:/drivers/chromedriver.exe");

capabilities.setCapability(ChromeOptions.CAPABILITY, options); driver = new ChromeDriver(capabilities);

Train Answered on October 8, 2014.

That’s grate and just I wanted to know did my answer work for you or not?.

on October 9, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.