Chrome is being controlled by automated test software Chrome is being controlled by automated test software google-chrome google-chrome

Chrome is being controlled by automated test software


Add this to the options you pass to the driver:

options.addArguments("disable-infobars");


Previously, passing the "disable-infobars” ChromeOption to the WebDriver prevented Chrome from displaying this notification. Recently, the "disable-infobars" option has been deprecated and no longer removes the notification. The current workaround for this is to pass in an option called "excludeSwitches" and then exclude the "enable_automation" switch.

ChromeOptions options = new ChromeOptions(); options.setExperimentalOption("excludeSwitches", new String[]{"enable-automation"}); WebDriver driver = new ChromeDriver(options); 


ChromeOptions options = new ChromeOptions();options.setExperimentalOption("useAutomationExtension", false);options.setExperimentalOption("excludeSwitches",Collections.singletonList("enable-automation"));    WebDriver driver = new ChromeDriver(options);

Use the above codes for latest Chrome drivers.