Created
November 23, 2014 08:36
-
-
Save majgis/2472d08dc1dcf259c364 to your computer and use it in GitHub Desktop.
find protractor selenium jar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var lib = require('./lib'); | |
var protractor = require("gulp-protractor").protractor; | |
var jarPath = lib.getProtractorSeleniumJarPath(); | |
gulp.task('default', function(){ | |
gulp.src(["./spec/*.js"]) | |
.pipe(protractor({ | |
configFile: "protractor.config.js", | |
args: [ | |
'--seleniumServerJar', jarPath | |
] | |
})) | |
.on('error', function(e) { throw e }) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var glob = require('glob'); | |
module.exports = { | |
getProtractorSeleniumJarPath: function() { | |
var jarPath = glob.sync('node_modules/protractor/selenium/selenium-server-standalone-*.jar')[0]; | |
console.log(jarPath); | |
return jarPath; | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm config set http_proxy test | |
npm config set https_proxy test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment