options.add_argument("disable-infobars")
options.add_argument("start-maximized")
options.add_argument("disable-dev-shm-usage")
options.add_argument("no-sandbox")
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option("prefs", {
"download.default_directory": r"insert\desired\download\path",
"download.prompt_for_download": False,
"download.directory_upgrade": True,
"safebrowsing.enabled": True
})
options.add_argument("disable-blink-features=AutomationControlled")
options.add_argument("--window-size=1920x1080")
options.add_argument("--headless=new")
1. newest version of chromedriver 111 downloaded
2. updated the path in your environment variables and in service to match the path of the new chromedriver.exe