0

This question already has an answer here:

Scenario: There is download button in web Application. Now I need to download Multiple files via a Button click.

Map<String, Object>preferences=new Hashtable<String, Object>();
preferences.put("profile.default_content_settings.popups", 0);
preferences.put("download.prompt_for_download", true);
preferences.put("download.default_directory",downloadpath);
preferences.put("profile.content_settings.pattern_pairs.*.multiple-automatic-downloads", 4 );
preferences.put("profile.content_settings.exceptions.automatic_downloads.*.setting", 4 );
ChromeOptions options = new ChromeOptions();
options.addArguments("--no-sandbox", "--disable-extensions", "--disable-gpu");
options.setExperimentalOption("prefs", preferences);
DesiredCapabilities cap = DesiredCapabilities.chrome();
cap.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
cap.setCapability(ChromeOptions.CAPABILITY, options);

These are options for ChromeOption. I am not much aware of ChromeOption/FirefoxOption.

marked as duplicate by dzieciou, Nitin Rastogi, NarendraC, trashpanda, Kate Paulk Mar 25 at 11:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Even downloading a single file is a challenge. To get a proper advice you should provide as much details about your test as possible. – Alexey R. Mar 22 at 15:19
  • Add more description about your problem statement. also attach your code of what you have tried. Note: Selenium can only automate browser it cannot handle windows(OS) object. You might have to use 1.Robot Class in Java , 2.AutoIT 3.Sikuli. – Alok Mar 23 at 13:29