How to get rid of the infobar “Chrome is being controlled by automated test software” through Selenium

Try this:

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_experimental_option("useAutomationExtension", False)
options.add_experimental_option("excludeSwitches",["enable-automation"])

driver_path="/Users/myuser/Downloads/chromedriver"
driver = webdriver.Chrome(executable_path=driver_path, chrome_options=options)
driver.get('https://google.com')

driver.close()

Leave a Comment