How to use the selenium-standalone.install function in selenium-standalone

To help you get started, we’ve selected a few selenium-standalone examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pouchdb-community / worker-pouch / bin / test-browser.js View on Github external
function startSelenium(callback) {
  // Start selenium
  var opts = {};
  selenium.install(opts, function(err) {
    if (err) {
      console.error('Failed to install selenium', err);
      process.exit(1);
    }
    selenium.start(opts, function(err, server) {
      sauceClient = wd.promiseChainRemote();
      callback();
    });
  });
}
github pouchdb / plugin-seed / bin / test-browser.js View on Github external
function startSelenium(callback) {
  // Start selenium
  var opts = {version: '2.45.0'};
  selenium.install(opts, function(err) {
    if (err) {
      console.error('Failed to install selenium');
      process.exit(1);
    }
    selenium.start(opts, function(err, server) {
      sauceClient = wd.promiseChainRemote();
      callback();
    });
  });
}
github pouchdb / upsert / bin / test-browser.js View on Github external
function startSelenium(callback) {
  // Start selenium
  var opts = {version: '2.42.0'};
  selenium.install(opts, function(err) {
    if (err) {
      console.error('Failed to install selenium');
      process.exit(1);
    }
    selenium.start(opts, function(err, server) {
      sauceClient = wd.promiseChainRemote();
      callback();
    });
  });
}
github freenas / gui / gulp-tasks / test-e2e.js View on Github external
// check for more recent versions of selenium here:
            // https://selenium-release.storage.googleapis.com/index.html
            // 2.39.0 is the latest one to support java 7 (installed by default on most linux distros)
            version: '2.39.0',
            baseURL: 'https://selenium-release.storage.googleapis.com',
            drivers: {
                chrome: {
                    // check for more recent versions of chrome driver here:
                    // https://chromedriver.storage.googleapis.com/index.html
                    version: '2.27',
                    arch: process.arch,
                    baseURL: 'https://chromedriver.storage.googleapis.com'
                }
            }
        };
        selenium.install(seleniumConfig, function() {
            selenium.start(seleniumConfig, function(err, child) {
                return gulp.src('')
                    .pipe(nightwatch({
                        configFile: 'nightwatch.json'
                    }))
                    .on('end', function() {
                        setTimeout(function() {
                            child.kill();
                            browserSync.exit();
                        }, 500);
                    });
            });
        });
    }
};
github elastic / apm-agent-rum-js / dev-utils / test-utils.js View on Github external
function startSelenium(callback, manualStop) {
  callback = callback || function() {}
  var selenium = require('selenium-standalone')
  var drivers = {
    chrome: {
      version: '2.38',
      arch: process.arch,
      baseURL: 'https://chromedriver.storage.googleapis.com'
    },
    firefox: {
      version: '0.19.1',
      arch: process.arch
    }
  }
  selenium.install(
    {
      logger: console.log,
      drivers
    },
    function(installError) {
      if (installError) {
        console.log('Error while installing selenium:', installError)
      }
      selenium.start({ drivers }, function(startError, child) {
        function killSelenium() {
          child.kill()
          console.log('Just killed selenium!')
        }
        if (startError) {
          console.log('Error while starting selenium:', startError)
          return process.exit(1)
github Style-Validator / style-validator / src / app.js View on Github external
//set handler
server.on('request', requestHandler);
isAmazonLinux && secureServer.on('request', requestHandler);

//listen server
switch(process.env.SV_ENV) {

	case 'amazonLinux':

		server.listen(port, callbackAfterServerListening);
		secureServer.listen(securePort, callbackAfterServerListening);
		break;

	default:

		selenium.install(seleniumOptions, function(err) {
			console.log('Selenium is installed.');
			if(err) {
				console.error(err);
			}
			selenium.start(seleniumOptions, function(err, child) {
				console.log('Selenium is running.');
				if(err) {
					console.error(err);
				}
				//child.kill();
				child.stderr.on('data', function(data){
					console.log(data.toString());
				});
				server.listen(port, callbackAfterServerListening);
			});
		});
github glacejs / glace-js / lib / steps / web.js View on Github external
await new Promise((resolve, reject) => {

            selenium.install(opts, err => {
                if (err) reject(err);
                LOG.debug("Selenium drivers are installed");
                resolve();
            });
        });
    },

selenium-standalone

installs a `selenium-standalone` command line to install and start a standalone selenium server

MIT
Latest version published 5 months ago

Package Health Score

83 / 100
Full package analysis