Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to Selenium WebDriver.

I need to download the file, if we click on download, after downloading it it will ask confirmation to open or save file. It should save without asking confirmation.

Please help me how to handle this.

share|improve this question
When you say "it should save without asking confirmation" do you mean you need to know how to handle the confirmation dialog (which is standard in web applications) or you need to know how to disable the confirmation dialog for testing purposes? – Kate Paulk Jan 7 '14 at 13:11

If your goal is to bypass the confirmation for testing purposes, I know this can be done for Chrome:

  1. Open chrome://settings/ in the Chrome browser
  2. Select the "Show advanced settings..." link
  3. Scroll down to the "Downloads" settings
  4. Uncheck the box labeled "Ask where to save each file before downloading"

If you run your tests on Chrome you should be able to verify your download process with a more pure Selenium approach (not having to dabble in any black magic to get script away that dialog)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.