TestProject Forum
Powered by leading experts in the test automation community

Downloading files from page using selenium

How do i download files or check that file exists?

Also, is it possible to get size of file ?

To my knowledge it is not possible to have selenium download files for you since browsers use native dialogs for it that can’t be controlled via javascript. You would need to do this in some unconventional way.

There’s a nice blog post about this you might find interesting:
https://blog.codecentric.de/en/2010/07/file-downloads-with-selenium-mission-impossible/