I tried the following code to change the default download location of chrome. But still, the file is downloaded at "Downloads".
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
ChromeOptions=Options()
ChromeOptions.add_experimental_option("prefs", {"download.default_directory":"C:\\Users\Elite\Desktop"})
driver=webdriver.Chrome(executable_path='C:\Webdrivers\chromedriver.exe',chrome_options=ChromeOptions)
driver.get("url/website")
driver.find_element_by_xpath('xpath of download file').click()
I also tried this:
options = webdriver.ChromeOptions()
options.add_argument('download.default_directory=C:/Users/Elite/Desktop')
driver=webdriver.Chrome(options=options)
Any help would be appreciated !!!!