“You are using an unsupported command-line flag –ignore-certificate-errors. Stability and security will suffer.” Handling in WebDriver using ChromeOptions()

“You are using an unsupported command-line flag –ignore-certificate-errors. Stability and security will suffer.” has become a very annoying message whenever we try to execute our selenium WebDriver script in Chrome with the most recent update version of Chrome browser with recently updated Selenium Server Standalone Jar 2.42.0/2.41.0
It looks like this
You are using an unsupported command-line flag --ignore-certificate-errors. Stability and security will suffer.

I was just exploring the internet to find the solution and after half an hours effort has provided this solution to handle this problem with ChromeOptions().

So before going directly to code lets see what is Chrome Options so for time being take it as Firefox Profile means Chrome Options is also like a folder within Chrome where it stores all its bookmarks, passwords, and setting.

Now another question comes in mind “how to use the ChromeOptions class”
Ans:
You can create an instance of ChromeOptions, which has convenient methods for setting ChromeDriver-specific capabilities. You can pass the ChromeOptions object directly into the ChromeDriver constructor
Like this

ChromeOptions options = new ChromeOptions();
options.addArguments("--test-type");
WebDriver    driver = new ChromeDriver(options);

Now we have the way to handle above yellow annoying message by replacing

System.setProperty("webdriver.chrome.driver","Path of ");
   WebDriver driver = new ChromeDriver();

with these line of code

System.setProperty("webdriver.chrome.driver","Path of <chromedriver.exe>");
	        ChromeOptions options = new ChromeOptions();
	        options.addArguments("--test-type");
	        WebDriver driver = new ChromeDriver(options);

Here we have set argument of chrome to –test-type that handles the yellow annoying message when chrome browser first launched,So after using above four line of code,no yellow security message would appear on screen.

===========================================================================

Special Thanks To Jason Chou and Dom who has asked help to post solution that a common computer user can use.So here is the step to remove above error once you are launching your chrome browser mainly who has installed version 35 of chrome.

Steps:
1- Go to Chrome Icon
2- Right Click on Chrome Icon, Go to Property
3- Google Chrome Properties window would be launched.
Like this :
Chrome Property

4- Go to Target field and  paste  this line “C:\Program Files\Google\Chrome\Application\chrome.exe” –test-type
5- Click on Apply button and if your chrome browser instance is open then close all instance of Chrome browser and again launch your chrome browser through Chrome Icon present on your desktop.
6- By doing so you can resolve the error “You are using an unsupported command-line flag –ignore-certificate-errors. Stability and security will suffer.” manually without using any code. and my friends who really want to launch chrome instance without using all these things then we have another option as well and Steps are as follows using Run windows

1- Open Run window by using Window Key +R
2-
In Run window enter  chrome.exe –test-type and click on Ok button
see in image

Chrome Command3- Above command would launch Chrome browser free from any error.

Hope above all three-way would help you a lot.

Thank you!! and keep reading and don’t forget to like and share this post.

Dwarika Dhish Mishra

My name is Dwarika Dhish Mishra, its just my name and I am trying to bring the worth of my name in to actions and wants to be the solution not the problem. I believe in spreading knowledge and happiness. More over I am fun loving person and like travelling a lot. By nature I am a tester and a solution maker. I believe in the tag line of http://ted.org “Idea worth spreading” . For the same, I have created this blog to bring more and more learning to tester fraternity through day to day learning in professional and personal life. All contents are the part of my learning and so are available for all..So please spread the contents as much as you can at your end so that it could reach to every needful people in testing fraternity. I am pretty happy that more and more people are showing interest to become the part your Abode QA blog and I think this is good sign for us all because more and more content would be before you to read and to cherish. You may write or call me at my Email id: dwarika1987@gmail.com Cell: 9999978609

You may also like...

23 Responses

  1. anmol says:

    very helpful. i saw this but ignored as i dont have that much time to dive into the things, but this post was very helpful. – Anmol

    • Uday says:

      Hi,

      What I have to type In place of “–test-type”..

      can you please suggest..

      Thanks in Advance!!

  2. Amol says:

    Thank you very much.I was facing the problem the yellow error message . And your suggestion worked.Saved my day…!

  3. Jason Chou says:

    Could you tell me where I need to put those codes? Sorry to trouble you but I really have no idea about the problem I am facing.Thank you very much

  4. Dom says:

    I am a computer user – not a programmer. Where do I input such code? Is there an idiot proof solution?

  5. Giribabu says:

    It worked for me…thanks

  6. rahul says:

    Best Solution Ever!! thanks for saving my time…

  7. Melisse says:

    Thanks i found this very helpful 🙂

  8. Tom Potter says:

    Thanks so much! That was extremely helpful 🙂

  9. Biju says:

    I am getting this error,
    “The name “C:\Program Files\Google\Chrome\Application\chrome.exe” –test-type specified in the target box is not valid. Make sure the path and file name are correct

  10. Kirankumar P says:

    Fantastic works fine

  11. Umesh says:

    I am using Xubuntu v14.04 and Chrome v53.0.2785.116 (64-bit) and facing this issue so how can I fix in it.

    Please help

  12. rahul says:

    Hi Im getting this error while launching chrome driver

    I m using selenium 3.0
    chrome driver 2.25
    chrome version 55.0

    Error ;
    data:text/html;charset=utf-8,

  13. Cheena says:

    Hey,

    I m geeting the same error when i m using chrome with vba macro. Actually in my work some site not working in explorer then for the solution i need to use chrome. Please suggest how can i resolve this issue in vba as well.

  14. Snehashish Chakraborty says:

    This really worked in removing the annoying message. Thanks Bruh..
    ChromeOptions option=new ChromeOptions();
    option.addArguments(“–test-type”);
    WebDriver driver=new ChromeDriver(option);

    Setting up these parameters and using the options utility of ChromeOptions helps in removing the message.

  15. Jim Martin says:

    Hey this also worked with Linux (fedora 26) google chrome …
    I edited /opt/google/chrome/google-chrome file.
    I replaced last line in file :

    exec -a “$0” “$HERE/chrome” “$@”

    with:

    exec -a “$0” “$HERE/chrome” “$@” –user-data-dir –test-type –no-sandbox

    This allows me to run google chrome as “root” without annoying messages !

    Thanks for the post !

    • Hansch says:

      Thanks Jim for
      exec -a “$0” “$HERE/chrome” “$@” –user-data-dir –test-type –no-sandbox

      This allows me to run google chrome as “root” without annoying messages.
      Did work for me in Debian 9

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.