Cannot stop pusher from showing file download

Problem

I am testing file download, but when I start the download, the prompt β€œSave As ...” appears. I saw a solution in this SO question , but it doesn't seem to work for me.

Config

My protractor configuration file looks like this (coffeescript):

exports.config = capabilities: browserName: "chrome" shardTestFiles: true maxInstances: 2 chromeOptions: args: ['--no-sandbox', '--test-type=browser'] prefs: download: prompt_for_download: false default_directory: '/' default_content_settings: popups: 0 

More details

The chromeOptions.pref webdriver docs says:

See the Preferences file in the Chrome user data directory for an example.

In my own Chrome settings file, I do not see default_directory .

 "download": { "directory_upgrade": true, "prompt_for_download": false }, 

System

  • Protractor: version 1.5.0 (fairly new)
  • Node: 0.10.28, 0.11.8 and 0.11.14
+4
source share
1 answer

Specify the absolute path to the existing directory in default_directory chrome.

+5
source

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


All Articles