Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the default download directory with IE (Internet Explorer 11)

In this post I see the solutions for setting the download directories for Chrome and Firefox how to change file download location in Webdriver while using chrome driver/firefox driver

These worked perfect for me (the accepted answer that is), however searching around I cannot find any information on doing this with Internet Explorer 11. Does anyone know where I can find this information?

like image 605
Patrick Gallagher Avatar asked Mar 26 '16 21:03

Patrick Gallagher


2 Answers

According to this answer from Jim Evans, who is heavily involved with WebDriver for Internet Explorer, this isn't possible:

Internet Explorer doesn't use profiles. It's a limitation of the browser itself, not the IE driver. As such, there is no way to automatically download files to a specified location with Internet Explorer.

Also:

As far as I am aware, there is no difference between Microsoft Edge and Internet Explorer with respect to using "profiles." The profile is still tied to the logged-in user account in Windows.

So, in a sense, the directory already is specified. The point is that you can't override it via WebDriver.

like image 69
Andrew Regan Avatar answered Oct 06 '22 01:10

Andrew Regan


It's not possible through the driver, but you can define the location with this registry key:

HKCU\Software\Microsoft\Internet Explorer\Main\Default Download Directory
like image 28
Florent B. Avatar answered Oct 06 '22 00:10

Florent B.