message: Make sure we always have the latest version of selenium on run
diff: @@ -42,6 +42,11 @@ function startSeleniumServer(wct, done) {
  // See below.
  var log = [];
  + function onOutput(data) {
  + var message = data.toString();
  + log.push(message);
  + wct.emit('log:debug', message);
  + }
  var config = {
  seleniumArgs: ['-port', port],
  @@ -53,18 +58,17 @@ function startSeleniumServer(wct, done) {
  done();
  });
  - // If there is an error, we want to be able to give the user all sorts
  - // of useful output.
  - function onOutput(data) {
  - var message = data.toString();
  - log.push(message);
  - wct.emit('log:debug', message);
  - }
  server.stdout.on('data', onOutput);
  server.stderr.on('data', onOutput);
  },
  };
  + // Ensure that we have the latest version downloaded.
  + selenium.install({logger: onOutput}, function(error) {
  + if (error) {
  + log.forEach(function(line) { wct.emit('log:info', line) });
  + return done(error);
  + }
  selenium.start(config, function(error) {
  if (error) {
  log.forEach(function(line) { wct.emit('log:info', line) });
  @@ -75,6 +79,7 @@ function startSeleniumServer(wct, done) {
  });
  });
  });
  + });
  }
  module.exports = {
  