我按照这个SO 帖子
设置了我的Gruntfile
. 如果我手动下载 Selenium 独立版并在文件中指定其位置,我的测试将成功运行。由于我想自动化这个过程,我尝试了以下配置:
protractor_webdriver: {
start: {
options: {
path: 'node_modules/grunt-protractor-runner/node_modules/protractor/bin/',
command: 'webdriver-manager start'
}
}
};
grunt.loadNpmTasks('grunt-protractor-webdriver');
grunt.registerTask('test', ['protractor_webdriver:start','protractor:run'])
有没有办法避免手动下载?我尝试了上述方法,但是当我运行它时,我收到了警告:
Running "protractor_webdriver:start" (protractor_webdriver) task
Verifying property protractor_webdriver.start exists in config...OK
File: [no files]
Options: path="node_modules/grunt-protractor-runner/node_modules/protractor/bin/", command="webdriver-manager start", keepAlive=false
Starting Selenium server
>> Selenium Standalone is not present. Install with webdriver-manager update --standalone
所以我还需要手动下载 selenium 独立服务器吗?
或者我在这里错过了一些配置?