Robot Framework Change Download Directory Verified May 2026

Firefox uses a different set of internal preferences. You must set browser.download.folderList to 2 to tell Firefox to use a custom directory. browser.download.folderList : Set to 2 for custom paths. browser.download.dir : The actual path.

*** Test Cases *** Change Edge Download Path ${prefs} = Create Dictionary download.default_directory=${DOWNLOAD_PATH} Open Browser https://example.com edge options=add_experimental_option("prefs", ${prefs}) Use code with caution. Best Practices for Handling Downloads robot framework change download directory

: Use the OperatingSystem library's Create Directory keyword before opening the browser to ensure the target path exists. Firefox uses a different set of internal preferences

How to Change the Download Directory in Robot Framework When automating web applications with , a common challenge is managing where files are saved. By default, browsers use the system's "Downloads" folder, which can lead to messy test environments and difficulty in verifying downloaded content. browser

To make your tests more reliable and self-contained, you should configure the browser to download files into a specific project directory. This guide explains how to do this for , Firefox , and Edge using the SeleniumLibrary . 1. Setting the Download Directory in Chrome