I am trying to save the downloaded file from the website into my personal desktop folder but the file still gets saved in the Downloads folder. I do not know why Python is doing that. Python does not even display an error. Can someone please provide advice on what is the mistake here.
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
driver = webdriver.Chrome("C:\Python27\Scripts\chromedriver.exe")
number_option = driver.find_element_by_id("cplMain_btnSearch")
delay = 3
print "Page is ready!"
print "Loading took too much time!"
search_button = driver.find_element_by_id("cplMain_btnExportToExcel")
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(r"C:\Python27\Scripts\chromedriver.exe", chrome_options = options)
print 'ALL DONE'
Page is ready!
Per the post attached, I do not think it is possible to change the download directory.