Explore Courses Blog Tutorials Interview Questions
+7 votes
in DevOps and Agile by (50.2k points)
I used the following steps i.e. open the Browser > enter URL > 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 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

+7 votes
by (108k 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");

Browse Categories