This display is an obstacle, isn't it?
Do you want to disable developer mode when you turn off the notification bar? Popped up I couldn't find a way to do it, but I was able to turn off the notification bar with a matching technique, so I'll wake it up in the article.
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("excludeSwitches", new String[] { "enable-automation" });
options.setExperimentalOption("useAutomationExtension", false);
WebDriver driver = new WebDriver(options);
Hiding the password save popup
WebDriver driver = new WebDriver(options);
You can do this by adding the following code just before.
Map<String, Object> prefs = new HashMap<String, Object>();
prefs.put("credentials_enable_service", false);
prefs.put("profile.password_manager_enabled", false);
options.setExperimentalOption("prefs", prefs);
By writing this entirely in the code, the notification bar disappears brilliantly.
Recommended Posts