7

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();
option.AddArguments("disable-infobars");
driver = new ChromeDriver(option);

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

6

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.

1

You can try these two options:

ChromeOptions options = new ChromeOptions();    

options.setExperimentalOption("useAutomationExtension", false);
options.setExperimentalOption("excludeSwitches", 
Collections.singletonList("enable-automation"));

OR

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

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();
    co.addArguments("disable-infobars");

  • Add ChromeOptions to desired capabilities

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

  • Add DesiredCapabilities to Webdriver

    driver = new ChromeDriver(dc);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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