有以下protractor.conf.js:
exports.config = {
framework: 'jasmine',
specs: ['e2e-tests/**/*.js'],
seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
seleniumServerJar: './node_modules/protractor/selenium/selenium-server-standalone-2.47.1.jar'
}吞咽任务:
gulp.task('e2e-testing', ['webdriver_standalone'], function() {
gulp.src([]).pipe(protractor({ configFile: "protractor.conf.js" }))
.on('error', function(e) { throw e })
});这段代码运行良好,但我必须在启动webdriver-manager start --standalone任务之前执行e2e。我怎么能省略呢?我怎么能自动这么做呢?提前感谢
发布于 2015-10-05 21:52:23
只需删除seleniumAddress配置选项,以便在启动测试套件时使Protractor自动实例化新服务器。否则,如果指定了服务器地址,则Protractor尝试连接到它,而不是创建一个新地址。查看从测试脚本在医生里启动服务器的部分
请注意,如果设置seleniumAddress,则将忽略seleniumServerJar、seleniumPort、seleniumArgs、sauceUser和sauceKey的设置。
发布于 2019-01-16 06:56:13
是的,我们需要在config.js中添加以下内容
'4444',并从配置文件中删除seleniumAddress。
它工作得很好
https://stackoverflow.com/questions/32953141
复制相似问题