How to set InternetExplorerDriver download directory?

We use Selenium to check file downloads from our web application. We currently use Firefox, install it in the desired download directory, and make sure that pop-ups are not displayed and that user interaction is not required when downloading files.

For FirefoxDriver, we do this:

File downloadDir = ...; FirefoxProfile profile = new FirefoxProfile(); profile.setPreference("browser.download.dir", downloadDir.getAbsolutePath()); profile.setPreference("browser.download.folderList", 2); profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "..."); WebDriver driver = new FirefoxDriver(profile); 

What to do for InternetExplorerDriver to achieve the same effect? I could not find InternetExplorerProfile or the switch in DesiredCapabilities.

 DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("???", "???"); WebDriver driver = new InternetExplorerDriver(capabilities); 
+6
source share
1 answer

Internet Explorer does not use profiles. This is a limitation of the browser itself, not the IE driver. Thus, it is not possible to automatically upload files to a specified location in Internet Explorer.

+7
source

Source: https://habr.com/ru/post/952736/


All Articles