Search code examples
selenium-webdriverselenium-chromedriverwebdrivermicrosoft-edge

Where can I find a list of all experimental_option 'prefs' keys for Edge as 'download.default_directory' and 'download.prompt_for_download'?


I'm using Python with Selenium to automate Edge.

Where can I find a list of all experimental_option 'prefs' keys for Edge as 'download.default_directory' and 'download.prompt_for_download'?

In other words, the keys of the dictionary for 'prefs' you can read about on page Capabilities and EdgeOptions.

I've tried to search at my best on the web.


Solution

  • You need to find them in chromium source code: https://chromium.googlesource.com/chromium/src/+/4aaa9f29d8fe5eac55b8632fa8fcb05a68d9005b/chrome/common/pref_names.cc.

    For example, you can find download.default_directory and download.prompt_for_download in the file:

    // String which specifies where to download files to by default.
    const char kDownloadDefaultDirectory[] = "download.default_directory";
    
    // Boolean which specifies whether we should ask the user if we should download
    // a file (true) or just download it automatically.
    const char kPromptForDownload[] = "download.prompt_for_download";