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("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.

  • 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.
    Commented Mar 22, 2019 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
    Commented Mar 23, 2019 at 13:29


Browse other questions tagged or ask your own question.