How to set download path for EdgeDriver using EdgeOptions

1,344 views
Skip to first unread message

Sagar Gulhane

unread,
Jun 25, 2020, 2:53:07 AM6/25/20
to Selenium Users
I am using selenium 3.141 with C# I would like to set the download path using EdgeOptions. Please any one can help me with this. 

Current code I am using as below which is not working need to know the correct capabilities to add for Edge driver

  EdgeOptions edgeOptions = new EdgeOptions();
                edgeOptions.AddAdditionalCapability("download.default_directory", {Path});
                edgeOptions.AddAdditionalCapability("download.prompt_for_download", "false");

                driver = new EdgeDriver(edgeOptions);

Mark Collin

unread,
Jun 25, 2020, 4:09:42 AM6/25/20
to Selenium Users

Sagar Gulhane

unread,
Jun 25, 2020, 1:53:44 PM6/25/20
to Selenium Users
Thanks Mark,

For suggested solution I have to navigate to Download File URL, But as per scenario I have to click on the Link after that file should get download. its mandatory to click on the button/Link and then verify the downloaded file I am able to set download path in Chrome, IE and Firefox but I need help to set it in edge Chromium browser. 

Mark Collin

unread,
Jun 30, 2020, 5:09:47 AM6/30/20
to Selenium Users
The question you need to ask yourself is this:

How would we fix the issue if the file exists and can be downloaded (Something you can check using the principles outlined in that log entry), but clicking on the button to download it doesn't work?

The answer is that you can't, you are testing browser functionality.  You cannot fix a browser bug and release a new version of the browser.  Even if you could, you can't force your user to use the new updated version of the browser.

By all means check that the file is there and can be downloaded, however don't waste your time trying to test browser functionality that you have no control over.

Andrei Solntsev

unread,
Jun 30, 2020, 5:50:24 AM6/30/20
to seleniu...@googlegroups.com

вт, 30 июн. 2020 г., 12:10 Mark Collin <fyre...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/01d4ea79-3c5d-4730-a1b8-620d7d1fc4c5o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages