Hello :/ I am currently having trouble setting up the Download folder inside my project.
I'm using Mac, Pycharm CE, Selenium, Python, Behave, and Firefox (project requirements).
I tried this configuration Python Selenium Firefox trouble with download directory but I'm not sure which part did I do wrong. :/ The downloaded files still go to the default Downloads folder.
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
@given("First step")
def step_impl(context):
download_path = "/Users/this/is/the/absolute/path/downloads"
options = Options()
options.set_preference("browser.download.folderList", '2')
options.set_preference("browser.download.manager.showWhenStarting", False)
options.set_preference("browser.download.dir", download_path)
options.set_preference("browser.helperApps.neverAsk.saveToDisk", "text/csv")
context.driver = webdriver.Firefox(options=options)