Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Add support for downloading files #39

Open
cezarypiatek opened this issue Sep 26, 2017 · 2 comments
Open

Add support for downloading files #39

cezarypiatek opened this issue Sep 26, 2017 · 2 comments
Assignees
Projects

Comments

@cezarypiatek
Copy link
Owner

cezarypiatek commented Sep 26, 2017

http://selenium-python.readthedocs.io/faq.html#how-to-auto-save-files-using-custom-firefox-profile
https://stackoverflow.com/questions/27824124/how-to-change-file-download-location-in-webdriver-while-using-chrome-driver-fire

Map chromePrefs = new HashMap();
chromePrefs.put(“profile.default_content_settings.popups”, 2);
chromePrefs.put(“download.default_directory”, getFilePath());
ChromeOptions options = new ChromeOptions();
//Map chromeOptionsMap = new HashMap();
options.setExperimentalOption(“prefs”, chromePrefs);
options.addArguments(“–test-type”);
capability = DesiredCapabilities.chrome();
capability.setCapability(“chrome.switches”, Arrays.asList(“–start-maximized,–ignore-certificate-error”));
capability.setCapability(ChromeOptions.CAPABILITY, options);
//capability.setCapability(ChromeOptions.CAPABILITY, chromeOptionsMap);
@cezarypiatek
Copy link
Owner Author

There is a dedicated method to set this options through chrome remote interface https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-setDownloadBehavior

@cezarypiatek
Copy link
Owner Author

There is a problem with passing preferences to OperaDriver
operasoftware/operachromiumdriver#18

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
MvcPages
Awaiting triage
Development

No branches or pull requests

1 participant