Downloading file and saving it to the desired location in Selenium Webdriver

0 votes

I want to download a file (like an image, pdf, jar and so on) by clicking on any link or button then, click on the save button if present and then save the file to the desired location.

How can we implement this using Java in Selenium WebDriver?

May 8, 2018 in Selenium by Atul
• 10,200 points
212 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

When you are setting up the Firefox profile, you need to add a call to set the property: browser.helperApps.neverAsk.saveToDisk to a comma-separated list of MIME types to always download it. Use the below code to set:

firefoxProfile.setPreference("browser.helperApps.neverAsk.saveToDisk","text/csv");
answered May 8, 2018 by Meci Matt
• 9,400 points

Related Questions In Selenium

0 votes
1 answer

How do i change the location where my file gets downloaded in Selenium Webdriver and firefox driver?

There are a couple of errors there. ...READ MORE

answered Apr 12, 2018 in Selenium by nsv999
• 5,030 points
819 views
0 votes
1 answer

What is Xpath and what are the types of it in Selenium Webdriver?

Hi Piyush, XPath is defined as XML path. It is ...READ MORE

answered May 8 in Selenium by Pratibha
• 2,520 points
19 views
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,030 points
69 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
438 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
54 views
0 votes
1 answer
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.