While I’m not the first to ask about this, I’ve yet to find any solutions, so curious if anyone has had any luck. This is an age old problem in the chromedriver/selenium community, and the correct approach is constantly changing…
When executing a test in Chrome that, at some point, downloads multiple files from an app, the following alert will occur:
Making a selection upon seeing this alert is equivalent to configuring the following browser setting manually:
Settings > Advanced > Privacy and security > Content settings > Automatic downloads
This is not new; it’s apparently Chrome trying to mimic a similar security feature that Firefox uses. What is new, and constantly changing, is how the user’s choice of ‘Allow’ or ‘Block’ get stored/handled in the Preferences file for the browser. Below is the relevant JSON object that stores this setting in the prefs file. This is how it looks BEFORE allowing multiple file downloads:
Here’s how it looks AFTER you click ‘Allow’, or set it yourself in the settings:
Great, so we have a property that we can set using Desired Capabilities, right?:
Except that this property never gets injected once the driver is instantiated!
And here’s the real kicker: I don’t think it’s chromedriver’s fault. I believe that Chrome is (somehow) blocking the programmatic setting of this specific property, and (somehow) allowing only a manual user to make this configuration. To prove it, lets try putting an intentional typo in there:
Strangely, chromedriver has no problem injecting this property…:
Queue ominous X-Files theme song…
I’ve tried using essentially every single desired capability that’s ever been suggested, but to no avail Has anyone else had any luck with this?
Chrome version: 71.0.3578.80 (Official Build) (32-bit)
Thanks in advance!