How can I download the *.jar file from http:// seleniumhq.org using selenium WebDriver?

0 votes

I used the following steps i.e.  open the Browser > enter URL http://seleniumhq.org > Click Download tab > click Download version “2.46.0” link It opens a dialog window. And then click “Save File” button

Note: I have tried download *.xls file example code from  http://seleniumeasy.com/selenium-tutorials/how-to-download-a-file-with-webdriver which is working fine. It automatically handles the dialog box and saves the file in destination location but the same code is not working to download the *.jar file. Can anyone help me in this?

Apr 9, 2018 in Selenium by Vardy
• 2,360 points
1,232 views

1 answer to this question.

0 votes

For Selenium Standalone Server use this:

profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/java-archive");

and for downloading selenium java webdriver:

profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/zip");

answered Apr 9, 2018 by Martin
• 4,340 points

Related Questions In Selenium

0 votes
1 answer

Downloading *.jar file from http:// seleniumhq.org using Selenium WebDriver

For Selenium Standalone Server: profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/java-archive"); If downloading ...READ MORE

answered Apr 17, 2018 in Selenium by Shubham
• 13,450 points
2,186 views
0 votes
1 answer

How can I locate web elements from a web page using Selenium Webdriver?

Hey @Dushyant, Locating elements in WebDriver is ...READ MORE

answered May 28, 2019 in Selenium by Shreya
972 views
0 votes
1 answer

How can I clear the text in a text box using Selenium WebDriver?

Hello Akriti, you can clear the text ...READ MORE

answered May 29, 2019 in Selenium by Anvi
• 14,110 points
1,217 views
0 votes
2 answers

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,520 points
3,797 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31 in Selenium by Sri
• 2,970 points
4,780 views
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,890 points
2,756 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2 in Selenium by Sri
• 2,970 points
3,115 views
0 votes
2 answers

How to get a page name using Selenium Webdriver (C#)?

String pageTitlte=driver.getTitle(); READ MORE

answered Sep 5 in Selenium by Sri
• 2,970 points
723 views
0 votes
2 answers

Difference between Action and Actions in Selenium

 Actions class is based on builder design pattern ...READ MORE

answered Jun 21, 2019 in Selenium by virendra

edited Jul 26, 2019 13,571 views