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,270 points
698 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,230 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,350 points
603 views
0 votes
1 answer
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 in Selenium by Anvi
• 13,960 points
354 views
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,110 points
1,128 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,150 points
1,239 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,150 points
988 views
0 votes
1 answer

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

I believe the below thing works: driver.Title; READ MORE

answered Sep 14, 2018 in Selenium by Martin
• 4,230 points
199 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 in Selenium by virendra

edited Jul 26 6,478 views