无法从显示文件下载提示停止量角器

问题描述:

我测试下载文件,但是当我触发下载,另存为...提示出现。
我看到了一个解决方案SO问题似乎,但不为我工作。

I'm testing downloading a file, but when I trigger the download, the "Save as..." prompt appears. I saw a solution in this SO question but it doesn't seem to work for me.

我的量角器配置文件看起来像这样(的CoffeeScript):

My protractor config 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

更多

chromeOptions。preF 的webdriver文档状态:

查看'preferences'文件为例子Chrome的用户数据目录。

See the 'Preferences' file in Chrome's user data directory for examples.

我不能真正看到 default_directory 在我自己的铬preferences 的文件。

I can't actually see default_directory in my own Chrome preferences file.

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

系统


  • 量角器:版本1.5.0(pretty新)

  • 节点:0.10.28,0.11.8和0.11.14

提供对现有目录中的绝对路径 default_directory 的镀铬preference。

Provide an absolute path to an existing directory in default_directory chrome preference.