Angularjs Can';t停止量角器显示文件下载提示 问题
我正在测试下载一个文件,但是当我触发下载时,会出现“另存为…”提示。 我看到了一个解决方案,但它似乎不适合我 配置 我的量角器配置文件如下所示(coffeescript): 更多 在Angularjs Can';t停止量角器显示文件下载提示 问题,angularjs,google-chrome,testing,selenium-webdriver,protractor,Angularjs,Google Chrome,Testing,Selenium Webdriver,Protractor,我正在测试下载一个文件,但是当我触发下载时,会出现“另存为…”提示。 我看到了一个解决方案,但它似乎不适合我 配置 我的量角器配置文件如下所示(coffeescript): 更多 在chromeOptions.pref上,状态为: 有关示例,请参见Chrome用户数据目录中的“首选项”文件 在我自己的Chrome首选项文件中,我实际上看不到default\u目录 系统 量角器:1.5.0版(非常新) 节点:0.10.28、0.11.8和0.11.14 在default\u目录chrome首选项
chromeOptions.pref
上,状态为:
有关示例,请参见Chrome用户数据目录中的“首选项”文件
在我自己的Chrome首选项文件中,我实际上看不到default\u目录
系统
- 量角器:1.5.0版(非常新)
- 节点:0.10.28、0.11.8和0.11.14
default\u目录
chrome首选项中提供现有目录的绝对路径。您是否尝试将default\u目录
设置更改为现有目录的绝对路径,如果我在6小时前阅读了这个问题/答案,那么今天对我来说会轻松得多:有没有办法不使用绝对路径
?如果我尝试使用relative
,弹出窗口
选项不起作用!感谢这个解决方案,我在@BrunoSoko遇到了同样的问题,我使用这个'default\u目录:process.cwd()+'/your/relative/path/'
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
"download": {
"directory_upgrade": true,
"prompt_for_download": false
},