John Goering
John Goering

Reputation: 39030

(Selenium) How to test whether a download of a certain file was started?

I want to test whether a certain action results in a file download (a) at all, and (b) with the file having a certain name.

Is there any way to use Selenium to do this?

Upvotes: 2

Views: 1195

Answers (1)

Dave Hunt
Dave Hunt

Reputation: 8223

The current version of Selenium runs in the JavaScript sandbox so can't control things outside of the page such as downloading files, uploading files, etc.

You might find that WebDriver (soon to be Selenium 2.0) supports downloads as it is not restricted to JavaScript in the same way as Selenium 1.0. See http://code.google.com/p/selenium/wiki/GettingStarted for more information.

Upvotes: 3

Related Questions