How to set the default file download directory for IE

4,881 views
Skip to first unread message

Musaffir Lp

unread,
Aug 20, 2015, 1:48:28 AM8/20/15
to Selenium Users
Hi All,

I wanted to set the default file download directory for IE when it run with selenium web driver

This is possible in the case of Firefox and Chrome with the help of firefox profile and chrome options respectively

Do we have a similar way to handle this in Internet explorer too ?

When webdriver try to download a file in IE,the browser should not prompt where to save the file , instead it should save the file in any default download folder which configured before creating the driver instance
Please let me know 


Thanks & Warm Regards
Musaffir

Krishnan Mahadevan

unread,
Aug 24, 2015, 3:34:26 AM8/24/15
to Selenium Users
Yes you can do that.

Note : This is not possible from within the code though and you would need to do this configuration manually before running IE based tests.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.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 post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/48f6ca7f-a35f-46e2-8cda-93bac0396de8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Musaffir Lp

unread,
Aug 24, 2015, 7:34:43 AM8/24/15
to Selenium Users
Thanks Krishnan for the tips ..

In my test suite i have couple of test cases which deals with downloading the file. So i consider the downloaded files as 'testOutputs' as they are output of my test methods,
and keep them in a folder which generates at the beginning of the test suite execution.so the folder generates at run time .As i know the name of file i downloaded , i can validate the test too easily by checking the file present in that folder or not
Later in the next execution of the same test suite, i cleans this folder and new folder generates 

The run time generated download folder name i can link with the ff and chrome driver instance while driver is created and the downloaded files goes to that particular folder when the test runs from ff / chrome
i wanted to run the same tests in IE too and was looking for a similar kind of approach ,how ever i know its not possible as we dont have profile kind of things in IE unlike ff/chrome

Warm Regards
Musaffir

Krishnan Mahadevan

unread,
Aug 24, 2015, 8:11:57 AM8/24/15
to Selenium Users
You should still be able to get this done by pre-configuring the download location for IE.

Only difference is that now, you would basically have to move the downloaded file to a different location after the download action has been complete.

All said and done, I hope you have gone through this post by Mark Collins about downloading and the caveats associated with it.



Here's a video talk by him on the exact same thing : https://skillsmatter.com/skillscasts/5068-what-did-you-just-download



Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

Musaffir Lp

unread,
Aug 25, 2015, 1:13:41 AM8/25/15
to Selenium Users
Thanks Krishnan
It makes sense to me :)

Warm Regards
Musaffir

Musaffir Lp

unread,
Nov 20, 2015, 4:09:59 AM11/20/15
to Selenium Users
Hi Krishnan,

Now am here in this post after couple of months and i am still concerned with few issues related to it :)

As you mentioned I can set a default download directory in IE once manually, that is fine 

How ever next comes the problem, when we hit on any link to download a file , the IE 11 prompt a tiny dialogue at bottom asking the user to either save / open the file ...
I don't want to see this prompt from IE,by default it should always save the file to the default download directory set earlier....... i couldn't figure out how we can set this up..?

Do you have any idea ?

Krishnan Mahadevan

unread,
Nov 20, 2015, 6:27:56 AM11/20/15
to Selenium Users

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

Reply all
Reply to author
Forward
0 new messages