Chrome is being controlled by automated test software
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import io.github.bonigarcia.wdm.WebDriverManager;
public class HideNotification {
public static void main(String[] args) {
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("excludeSwitches", new String[]{"enable-automation"});
WebDriverManager.chromedriver().version("90.0.4430").setup();
WebDriver driver = new ChromeDriver(options);
}
}
To get rid of notification message "Chrome is being controlled by automated test software" you can use ChromeOption class method name as setExperimentalOption as below.
options.setExperimentalOption("excludeSwitches", new String[]{"enable-automation"});
Post a Comment