New issue
Advanced search Search tips
Starred by 76 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Feb 2015

Sign in to add a comment

Issue 799: Chrome starts with message "You are using an unsupported command-line flag: --ignore-certifcate-errors. Stability and security will suffer."

Reported by, May 22 2014

Issue description

Issue Description:
Using Chromedriver 2.10.267517 and Chrome 35.0.1916.114 and selenium-server-standalone-2.41.0.jar

When Chrome starts it displays the message "You are using an unsupported command-line flag: --ignore-certifcate-errors. Stability and security will suffer." This changes the window height which is causing some window dimension sensitive tests to fail.

Steps to reproduce:
Start an instance of Chrome with Chromedriver. E.g. clone start Selenium standalone server and run `npm install && npm test`. Log file and screeenshot for these actions attached. I can also reproduce the behaviour with the Java WebDriver API using Maven and Thucydides.
Screen Shot 2014-05-22 at 11.22.48.png
69.9 KB View Download
39.0 KB View Download

Comment 1 by, May 22 2014

This doesn't happen with Chrome v34.

Comment 2 by, May 22 2014

--ignore-certificate-errors rather than --ignore-certifcate-errors, I think :)

The gotcha with this warning is that it affects overall internal window size and so media queries and sizing logic...

Comment 3 by, May 22 2014

It isn't just the warning getting in the way that is an issue. I have been running some longer tests using selenium and the chromedriver that take several hours to complete. After an hour or more the this issue causes the chromedriver to crash.

Comment 4 by, May 22 2014

See the following for a solution:

The problem doesn't lie in Chromedriver, but rather whatever is initializing the driver instance with the --ignore-certificate-errors flag.

Comment 5 by, May 22 2014

Comment 6 by, May 22 2014

Ah, good catch! I've always used the flag manually. Adding --test-type to the "args" of Chromedriver's desired capabilities still works around the issue regardless.

Comment 7 by, May 22 2014

Labels: Pri-3 OS-All
That's correct, the switch is built into chromedriver. The warning was added to chrome recently (in M35), but the switch should still work as it did in previous releases.

#3 - are you sure your crashes are being caused by --ignore-certificate-errors? How reliably can you reproduce this crash, and does it stop if you disable the switch?

Comment 8 by, May 23 2014

 Issue 802  has been merged into this issue.

Comment 9 Deleted

Comment 10 by, May 23 2014

I'm getting the same banner with Chrome, but I fixed it with:


However, all of my Selenium-based tests are still failing when I try to call ExecuteScript() statements against secure https:// sites. Calls to ExecuteScript() work for http:// but not for https://

What's frustrating is that Google doesn't seem to maintain an easy-to-access install point for previous versions. In my case, I only want to downgrade to version 34 (from the current broken v35), but I couldn't find an install point anywhere. I lost over 4 hours tonight during a release because I had to manually invoke my automation tests for Firefox and IE since Chrome v35 didn't show up to the party.

Comment 11 by, May 23 2014

Here's the ExecuteScript wrapper that's blowing up in v35:

        public static Object ExecuteScript(string str)
            return ((IJavaScriptExecutor)_driver).ExecuteScript(str);

Comment 12 by, May 23 2014

#7 How do I disable this said switch? I tried the chromeOptions.AddArgument("--test-type"); but the result takes too long to process.

Comment 13 by, May 23 2014

It works for me, but you need to use the following:


The driver automatically adds the "--" in front of the argument.

Comment 14 by, May 23 2014

Yep, after removing the unnecessary "--", the new argument worked its magic and I stopped receiving errors when calling ExecuteScript().

Comment 15 by, May 23 2014

 Issue 801  has been merged into this issue.

Comment 16 by, May 23 2014

Here is a workaround: add this switch to "excludeSwitches", one of the available "capabilities".

Comment 17 by, May 23 2014

The excludeSwitches approach works for chromedriver for me.

For anyone using Python selenium, I believe there's an issue with being able to pass these nested options into the selenium desired_capabilities: that prevents you from passing this excludedSwitches.  The "test-type" argument does happen to fix this particular warning.

Comment 18 by, May 27 2014

It worked for me also, but you need to use the following:


for selenium dot net.

Comment 19 by, May 27 2014

Both the excludeSwitches and the test-type approaches work in my tests so far.  However, as one user indicates, adding "test-type" to the flags causes ChromeDriver to process significantly slower.  I switched to using the excludeSwitches option, but now, of course, pages with SSL issues will not load. 

Wonder if there's a way to just avoid or suppress this warning message?

Comment 20 Deleted

Comment 21 by, May 30 2014

encountering similar issue but mine is worse where the default page was kinda hung and was never loaded. I tried to add the following 2 lines of code, but it didn't help.
                    ChromeOptions chromeOptions = new ChromeOptions();
                    DesiredCapabilities capabilities = DesiredCapabilities.Chrome();
                    capabilities.SetCapability(ChromeOptions.Capability, chromeOptions);
                    driver = new ChromeDriver(somewhere, chromeOptions);

I tried to use the newest Chrome and ChromeDriver but not working either.

Worth noting is that the address bar shows something weird on the default page. 

any ideas what might go wrong?

Comment 22 by, May 30 2014

not sure why the screenshot wasn't included. try again here
9.5 KB View Download

Comment 23 by, May 30 2014

So this is actually a big deal.  None of my tests run unless I manually check that box in the yellow prompt.  Wouldn't chromedriver alert chrome somehow to say "Hey, you're in a test environment so don't show those types of prompts"?
8.0 KB View Download

Comment 24 by, May 30 2014

Is there a way to avoid having to set "--test-type"?  I'm using ChromeDriverService and from what I can tell there isn't a clean way to do this.  

Incidentally, it would be nice within chromedriver if it looked for env vars prefixed with "CHROME_DRIVER_" in addition to command line args.

Comment 25 by, May 30 2014

For anybody using Python Selenium bindings without the bugfix linked from post #17, the following code works for me:

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ["ignore-certificate-errors"])

driver = webdriver.Chrome(chrome_options=options)

Comment 26 Deleted

Comment 27 by, Jun 5 2014

I have also not had luck working around this issue when using ChromeDriverService

Comment 28 by, Jun 10 2014

	public void beforeMethod()
	// driver=new FirefoxDriver();
			DesiredCapabilities capabilities =;
			ChromeOptions options = new ChromeOptions();


			capabilities.setCapability(ChromeOptions.CAPABILITY, options);

Comment 29 by, Jun 10 2014

Hi folks, 
This  is the solution to remove the  you are using unsupported command line security will suffer in  chrome version 35
	public void beforeMethod()
	// driver=new FirefoxDriver();
			DesiredCapabilities capabilities =;
			ChromeOptions options = new ChromeOptions();
			capabilities.setCapability(ChromeOptions.CAPABILITY, options);

Comment 30 by, Jun 12 2014

#22 i am having the same issue, did you get any workaround for this?

Comment 31 by, Jun 14 2014

Some forum , I noticed that "test-type" seems to fix the issue but I tried myself and result is not as expected. Still issue remains same. I think its better to register the certificate of testing application under chrome certificate settings and then try it. I personally not tried as I moved to v34.

Waiting for the fix for this issue.

Comment 32 Deleted

Comment 33 by, Jun 15 2014

For Ruby bindings, the below worked for me

  caps ="chromeOptions" => {"args" => ["test-type" ]})

  @browser = Selenium::WebDriver.for :chrome,desired_capabilities: caps

Comment 34 by, Jun 15 2014

Updating my previous comment to include both local webdriver and remote driver scenarios. This suppressed the warning message on chrome35 (Remember that you have to get 2.10 chromedriver.exe from

  caps ="chromeOptions" => {"args" => ["test-type" ]})

@browser = Selenium::WebDriver.for :chrome,desired_capabilities: caps

RemoteWebDriver (using GRID):

  caps ="chromeOptions" => {"args" => ["test-type","whitelisted-ips=<comma separated ips>" ]})
@browser =  Selenium::WebDriver.for :remote, :url => "http://<gridhostip>:4444/wd/hub",:desired_capabilities => caps

Comment 35 by, Jun 16 2014

Thanks everyone for the workarounds. I would like to see the underlying issue resolved in Chromedriver. 

Currently we are keeping our version of Chrome static to avoid this issue. Altering the behaviour of Chrome to work around this isn't a valid option for us in terms of test validity.

Comment 36 by, Jun 16 2014

I changed versions to chromeDriver 2.10 and selenuim 2.42.0 and used above script and this time it worked for me. Here it is

Comment 37 by, Jun 19 2014

I also see this issue and some of test failed because of it. Does anybody know how to use this workaround in selenium grid2 node json configuration file?

				"browserName": "chrome",
				"version": "35",
				"platform": "WINDOWS",
				"maxInstances": 5,
				"seleniumProtocol": "WebDriver"

Comment 38 by, Jun 19 2014

I using following java code to avoid the warning message in browser. But looks like flag '--ignore-certifcate-errors.' make chrome running unstability and some pages couldn't show properly during testing. It's ok when manually access those page.

DesiredCapabilities capability =;
ChromeOptions options = new ChromeOptions();
options.addArguments(new String[]{"test-type"});
capability.setCapability(ChromeOptions.CAPABILITY, options);
new RemoteWebDriver(new URL(<url>), capability)

Comment 39 by, Jun 30 2014

Should this not be a higher priority than 3?

Comment 40 by, Jul 15 2014

System.setProperty("", "src/ucBrowserDrivers/chromedriver.exe");
			DesiredCapabilities capabilities =;
			capabilities.setCapability("chrome.switches", Arrays.asList("--incognito"));

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

Adding this code worked for me and removed the yellow band which had "You are using an unsupported command-line flag; --ignore-certificate-errors. Stability and security will suffer."
but initially when the browser window is opened the address bar still displays "data:," in it until the target URL is filled.

Thanks to all who had provided their piece of help!

Comment 41 by, Jul 15 2014

Did anyone solve it for phpunit?
I tried the following, but it didn't work:
$this->setDesiredCapabilities(array("args" => ["test-type"]));

Comment 42 by, Aug 1 2014

Adding the following lines work for me (v36.0)

System.setProperty("","Path of <chromedriver.exe>");
	        ChromeOptions options = new ChromeOptions();
	        WebDriver driver = new ChromeDriver(options);

Comment 43 by, Aug 13 2014

Using the C# binding on Chrome 36 with ChromeDriver 2.10 . 

Tried all options listed here still not working.

Comment 44 by, Aug 18 2014

thanx :)

Comment 45 by, Sep 4 2014

but initially when the browser window is opened the address bar still displays "data:," in it until the target URL is filled.

Comment 46 by, Sep 10 2014

Tried everything in this discussion thread, nothing works.

ChromeDriver 2.10.267517
Google Chrome 37.0.2062.120
Ubuntu 14.04.1 LTS
Selenium 2.39.0 used from Java

Comment 47 by, Sep 17 2014

If launching from from Ruby with Webdriver, passing test-type to chromeOptions args works.  I'm wondering if there is a way to check for the existence of this status bar for unit test purposes.  Any ideas?

Comment 48 by, Sep 17 2014

I'd like to re-iterate that passing flags to Chrome to alter its behaviour and so not show the status message is fundamentally at odds with the intention of testing. If your test passes with special flags, and then your product fails in the field you cannot cannot draw conclusions about the validity of your testing because it happened under non-representative conditions.

Either the browser vendor or the ChromeDriver team (or both) need to resolve this issue. If they don't see this behaviour as an issue then it would be very helpful if they could provide documentation on how to properly avoid this warning without invalidating testing.

Comment 49 by, Sep 20 2014

@jim.cres,  I couldn't agree more with your sentiments.

To me, chrome should behave normally.  To make it behave abnormally, you should be required to pass command line arguments.  You shouldn't be required to pass command line args to make it behave normally.

Comment 50 by, Oct 6 2014

Status: ToBeReleased
For ChromeDriver 2.11, which will be released very soon, we'll be passing a flag to Chrome to suppress this infobar warning.

Comment 51 by, Oct 6 2014


Comment 52 by, Oct 9 2014

Status: Closed

Comment 53 by, Feb 18 2015

Hi all

i am also facing this issue in chrome v40

Below code is working fine..

System.setProperty("", file.getAbsolutePath());

ChromeOptions chromeOptions = new ChromeOptions();
DesiredCapabilities capabilities =;
capabilities.setCapability("chrome.switches", Arrays.asList("--incognito"));
capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);

 driver = new ChromeDriver(capabilities);

Comment 54 by, Feb 21 2015

Status: Fixed

Comment 55 by, Mar 16 2015

 Issue 826  has been merged into this issue.

Comment 56 by, Mar 19 2015

 Issue 805  has been merged into this issue.

Comment 57 by, May 21 2015

I had the same problem; but after a lot of R&D the following code worked for me:

File file = new File("drivers/chromedriver.exe");
System.setProperty("", file.getAbsolutePath());

DesiredCapabilities capabilities =;
ChromeOptions options = new ChromeOptions();

capabilities.setCapability(ChromeOptions.CAPABILITY, options);

webDriver = new ChromeDriver(capabilities);

Comment 58 by, May 21 2015

In addition to previous comment; I have tested this code with Google Chrome Version 43.0.2357.65

Comment 59 by, Jul 16 2015

Getting browser issue while running protractor script.
Please help me if anyone has any idea on this
protractor issue.jpg
161 KB View Download

Comment 60 by, Sep 7 2016

Hello, I encounter the same issue and unfortunately I've noticed that there seems to be a solution provided by Virkant but I don't really know where to write this code exactly.
Can you please help me out a bit?

Comment 61 by, Sep 8 2016

Project Member

Comment 62 by, Sep 8 2016

Project Member
This is a very old issue & has been closed long back. It's hard for us to keep track of the comments posted in such closed issues.

Please feel free to file a new issue if you seeing it again. Make sure to provide repro test along with completely reproducible test page.

Comment 63 Deleted

Comment 64 by, Feb 18 2017 - Агенты 003 (18.02.2017) смотреть онлайн

Comment 65 by, Aug 2 2017

Hello, I have the same problem now!
you can see my code and the result
any body have a solution?
selenium code error.PNG
67.0 KB View Download

Sign in to add a comment