“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
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 :
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
3- 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.
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
Hi,
What I have to type In place of “–test-type”..
can you please suggest..
Thanks in Advance!!
Thank you very much.I was facing the problem the yellow error message . And your suggestion worked.Saved my day…!
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
You can refer to my blog article about use of chrome options in selenium webdriver program http://www.helloselenium.com/2014/09/how-to-add-extension-to-google-chrome.html.
If requires any more assistance please feel free to ask.
I am a computer user – not a programmer. Where do I input such code? Is there an idiot proof solution?
You can refer to my blog article about use of chrome options in selenium webdriver program http://www.helloselenium.com/2014/09/how-to-add-extension-to-google-chrome.html.
It worked for me…thanks
Best Solution Ever!! thanks for saving my time…
Thanks i found this very helpful 🙂
Most welcome, i am happy that this post has really helped you to solve your problem
Thanks so much! That was extremely helpful 🙂
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
Check the path of your chromedriver exe..
Correct it and it will work for you
Please correct the path of your chrome driver exe and it will work for you.
Fantastic works fine
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
Please try the solution it will work for you as well
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,
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.
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.
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 !
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