webdriverio-boneyard / gulp-webdriver

gulp-webdriver is a gulp plugin to run selenium tests with the WebdriverIO testrunner
http://webdriver.io
MIT License
76 stars 33 forks source link

Error: task completion callback called too many times #44

Closed DaveStein closed 8 years ago

DaveStein commented 8 years ago

Not sure if this is related to #41 but if I do the following, the gulp task hangs as if waiting on something async:

gulp.task('default', ['selenium'], function(done) {
  return gulp.src('wdio.conf.js').pipe(webdriver());
});

If I try doing the following, it errors with Error: task completion callback called too many times

gulp.task('default', ['selenium'], function(done) {
  return gulp.src('wdio.conf.js').pipe(webdriver())
  .on('end', function() {
    done();
  });
});
DaveStein commented 8 years ago

btw doing process.exit() works within end but that seems wrong

DaveStein commented 8 years ago

Er realized that selenium was still running and needed to do selenium.process.kill();