The option to disable infobar "Chrome is being controlled by automated test software" was removed from Chrome.

Chrome version: 65.0.3325.146

Chrome driver: 2.36

OS: Windows 10

I used the code below:

ChromeOptions option = new ChromeOptions();
driver = new ChromeDriver(option);

Do we have any solutions, how to disable infobar, please ?


4 Answers 4


Disabling infobars is not supported anymore by Chromium.

According to them,

Remove --disable-infobars.

This flag is no longer needed by the perf testing infrastructure and can be misused for malicious purposes, so remove it.

So either you can downgrade your chrome version or start ignoring the infobar in the new version.


Solution for Java, Python, Ruby, JS, Protractor


When using java, you can code like this:

ChromeOptions options = new ChromeOptions()
.addArguments("--disable-infobars") // no longer works any more 
// here is the solution 
.setExperimentalOption("excludeSwitches", new String[]{"enable-automation"}) ;
// put it as args
ChromeDriver webDriver = new ChromeDriver(options);
// OK,enjoy 

  • 1
    Please don't post links without explanation. The article is a good one, but you should post a summary of the article before directing users to it.
    – Kate Paulk
    Commented Sep 13, 2019 at 12:25
  • Python chrome_options.add_experimental_option('excludeSwitches', ['enable-automation']) Note that the "--" that you use in older versions of chrome_options are omitted . Commented Jan 10, 2022 at 16:52

You can try these two experimental options:

ChromeOptions options = new ChromeOptions();    
options.setExperimentalOption("useAutomationExtension", false);
WebDriver driver = new ChromeDriver(options);
  • The problem will not be solved by this code. Other suggestions, please.
    – Majkl
    Commented Mar 12, 2018 at 14:37
  • This solution worked for me in Selenium
    – T-coder
    Commented Mar 19, 2018 at 20:43

Disable infobar in Chrome is working fine, even in the latest chrome version 69 along with chromedriver version 2.42.

Steps to Disable infobars in Chrome.

  • Define ChromeOptions

    ChromeOptions co = new ChromeOptions();

  • Add ChromeOptions to desired capabilities

    DesiredCapabilities dc = new DesiredCapabilities();
    dc.setCapability(ChromeOptions.CAPABILITY, co);

  • Add DesiredCapabilities to Webdriver

    driver = new ChromeDriver(dc);

Not the answer you're looking for? Browse other questions tagged or ask your own question.