+9 votes
1 view
in Devops and Agile by (27k points)
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 with this?

1 Answer

+9 votes
by (57.2k points)

For Selenium Standalone Server perform the following:

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

and for downloading selenium java webdriver, follow the below statement:

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

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...