Home » Software Testing » Automation Testing » Selenium WebDriver Tutorial » “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.” 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

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

with these line of code

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.

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

  1. 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

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

  3. 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. 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

  5. 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,

  6. 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.

  7. Snehashish Chakraborty

    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.

  8. 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” “[email protected]

    with:

    exec -a “$0” “$HERE/chrome” “[email protected]” –user-data-dir –test-type –no-sandbox

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

    Thanks for the post !

    1. Thanks Jim for
      exec -a “$0” “$HERE/chrome” “[email protected]” –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.

%d bloggers like this: