Home

Published

- 1 min read

add download directory selenium python

img of add download directory selenium python

The solution for this is noted below

add download directory selenium python

Solution

   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, chrome_options=chromeOptions)

Try other methods by searching on the site. That is if this doesn’t work