The following worked for me:
chromeOptions = webdriver.ChromeOptions()
prefs = {"download.default_directory" : "/some/path"}
chromeOptions.add_experimental_option("prefs",prefs)
chromedriver = "path/to/chromedriver.exe"
driver = webdriver.Chrome(executable_path=chromedriver, options=chromeOptions)
Source: https://sites.google.com/a/chromium.org/chromedriver/capabilities
More Related Contents:
- WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH while setting UserAgent through Selenium Chromedriver python
- WebDriverException: unknown error: cannot find Chrome binary error with Selenium in Python for older versions of Google Chrome
- How to allow or deny notification geo-location microphone camera pop up
- Unable to locate element of credit card number using selenium python
- WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127
- Error Message: ‘chromedriver’ executable needs to be PATH
- What is the fastest way to open urls in new tabs via Selenium – Python?
- ‘list’ object has no attribute ‘get_attribute’ while iterating through WebElements
- Access to table objects on Webpage Using Python Selenium
- ERROR:gpu_process_transport_factory.cc(1007)-Lost UI shared context : while initializing Chrome browser through ChromeDriver in Headless mode
- Selenium on MAC, Message: ‘chromedriver’ executable may have wrong permissions
- How to set proxy authentication (user & password) using Python + Selenium
- Chromedriver, Selenium – Automate downloads
- How to get rid of the infobar “Chrome is being controlled by automated test software” through Selenium
- TypeError: ‘module’ object is not callable error with driver=webdriver(“C:\\Python34\\Lib\\site-packages\\selenium\\webdriver\\chromedriver.exe”)
- Python selenium: DevTools listening on ws://127.0.0.1
- Undetected Chromedriver not loading correctly
- SessionNotCreatedException: This version of ChromeDriver only supports Chrome version 84 using ChromeDriver and Chrome through Selenium and Python
- How to solve ‘Getting Default Adapter failed’ error when launching Chrome and try to access a webpage using the ChromeDriver using Selenium
- Chrome browser initiated through ChromeDriver gets detected
- WebDriverException: Service U:/Scraping/chromedriver.exe unexpectedly exited. Status code was: 1 while working with Chrome and Python
- How to disable CSS in Python Selenium using ChromeDriver using ChromeOptions
- Selenium – Python – AttributeError: ‘WebDriver’ object has no attribute ‘find_element_by_name’
- How to locate and insert a value in a text box (input) using Python Selenium?
- How to rotate various user agents using selenium python on each request
- Python Selenium driver.execute_script WebDriverException: Message: unknown error: call function result missing ‘value’
- How to get the localStorage with Python and Selenium WebDriver
- Automation Google login with python and selenium shows “”This browser or app may be not secure””
- selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service chromedriver.exe while opening chrome browser
- Unknown error: Chrome failed to start: exited abnormally