Reputation: 37
I am using Selenium and trying to automatically click a button on a webpage, but the Chrome notification "Chrome is being controlled by automated test software" pops up every time I run the program. How do I automatically disable this notification?
I saw this solution in Java:
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("useAutomationExtension", false);
options.setExperimentalOption("excludeSwitches",Collections.singletonList("enable-automation"));
WebDriver driver = new ChromeDriver(options);
How would I write this block of code in Python?
Upvotes: 0
Views: 6974
Reputation: 1778
chrome_options = webdriver.ChromeOptions();
chrome_options.add_experimental_option("excludeSwitches", ['enable-automation']);
driver = webdriver.Chrome(options=chrome_options);
From first google resutlt: https://help.applitools.com/hc/en-us/articles/360007189411--Chrome-is-being-controlled-by-automated-test-software-notification
Upvotes: 4