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


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 Answer(s)
    Best answer

    It didn’t .. but ..

    I am now using the new version of chromedriver.exe and it now works without the warning message.

    Train Answered on October 30, 2014.

    For me it worked.

    on February 28, 2015.
    Add Comment

    Hello Allen,

    Please use below code.

    System.setProperty(“webdriver.chrome.driver”, (System.getProperty(“user.dir”)+”/chromedriver.exe”));
    ChromeOptions options = new ChromeOptions();
    WebDriver driver = new ChromeDriver(options);

    Vice Professor Answered on October 3, 2014.

    Could you please accept the previously asked all your queries. And also if the above one is worked for you 🙂 .

    on October 3, 2014.

    Dr Sachin :),

    I request you to use <> functionality to paste you code, so that it displays in coding format.

    Lakshay Sharma

    on October 3, 2014.

    Sorry 🙁 LS, this mistake will not happen again.

    on October 5, 2014.
    Add Comment

    I apologize for not using the <> for the code. I’ll do so in the future.

    I’m not sure what is wanted with “Could you please accept the previously asked all your queries”. Do you want me reply that the given answer worked or not in the questions I have asked?


    Train Answered on October 3, 2014.

    Hi Allen, If anyone’s solution/answer is worked for you then please accept that particular answer/solution. If not worked then please use the comment option for further discussion.  Thanks.

    on October 5, 2014.
    Add Comment

    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();



    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.