Hello to stack overflow community. I've been looking for a solution to permanently change the default download path of browsers (chrome, firefox and edge) to the one i specify in my python script. So far this python script is tested with chrome, which does not provide the desired results!
from selenium import webdriver
chromeOptions = webdriver.ChromeOptions()
prefs = {"download.default_directory" : "/some/path"}
chromeOptions.add_experimental_option("prefs",prefs)
chromedriver = "./chromedriver"
driver = webdriver.Chrome(executable_path=chromedriver, chrome_options=chromeOptions)
What essentially this script does is, open a new chrome window and change its download path to one specified in the script! Changes made are, just limited to this opened window that are discarded on window closing.
It seems to be creating some sort of session which certainly does not affect the original/default window's settings!
I might not have used the proper words/terms to describe the problem, please let me know if my problem is not clear enough!
Edit: In my case, use of selenium does not matter/necessary, what i want is a more generalized solution(plug and play) that on running(script) changes the path and does not need any setup of profile paths or binaries which is the case with selenium!