Hi,
I am new to Silk4J.My problem is that my silk4j script download file from Chrome on first attempt. But when it tried download 2nd time chrome shows pop-up "Allow multiple file download" . I want to disable this settings from Silk4j code using selenium.
If i manually change the settings in Chrome, it is worked for me when i downloaded manually .
But when Silk4J started the browser..the "allow multiple file download" settings vanished.
I studied Silk4J tutorial..there mentioned to get the current driver..but my question is how can i disable multiple file download..
BrowserApplication browserApplication = desktop.find("//BrowserApplication");
WebDriver driver = browserApplication.getWebDriver();
Found this code which will helpful to change the chrome driver settings..how this code will fit in Silk4j
HashMap<String, Object> chromePrefs = new HashMap<String, Object>();
chromePrefs.put("profile.default_content_settings.popups", 0);
chromePrefs.put("profile.default_content_setting_values.automatic_downloads", 1);
chromePrefs.put("download.prompt_for_download", false);
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("prefs", chromePrefs);
DesiredCapabilities cap = DesiredCapabilities.chrome();
cap.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
cap.setCapability(ChromeOptions.CAPABILITY, options);
Thanks,
Jyoti