Selenium Webdriver in Python - files download directory change in Chrome preferences
问题 I'm using Selenium Webdriver (in Python) to automate the downloading of thousands of files. I want to set Chrome's download folder programmatically. After reading this, I tried this: chromepath = '/Users/thiagomarzagao/Desktop/searchcode/chromedriver' desired_caps = {'prefs': {'download': {'default_directory': '/Users/thiagomarzagao/Desktop/downloaded_files/'}}} driver = webdriver.Chrome(executable_path = chromepath, desired_capabilities = desired_caps) No good. Downloads still go to the