How to use selenium-standalone - 10 common examples

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 bbody / CMD-Resume / wdio.conf.js View on Github external
jasmineNodeOpts: {
		defaultTimeoutInterval: 10000,
		grep: null,
		invertGrep: null
	},

	services: ['selenium-standalone', 'static-server'],
	staticServerFolders: [
		{mount: '/', path: './test_tmp'},
		{mount: '/node_modules', path: './node_modules'}
	],
	staticServerPort: 63342,

	// Firefox workaround
	seleniumArgs: {drivers: Object.assign({}, require('selenium-standalone/lib/default-config').drivers, {firefox: {version: '0.23.0'}})},
	seleniumInstallArgs: {drivers: Object.assign({}, require('selenium-standalone/lib/default-config').drivers, {firefox: {version: '0.23.0'}})},

	drivers: {
		chrome: {
			version: '2.39'
		}
	},

	onComplete: function(exitCode) {
		process.exit(exitCode);
	}
};
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 pouchdb / plugin-seed / bin / test-browser.js View on Github external
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 nkbt / esnext-quickstart / scripts / test-e2e.js View on Github external
function onSeleniumInstalled(err) {
  if (err) {
    console.error(err);
    return process.exit(1);
  }

  selenium.start({seleniumArgs: ['-debug']}, onSeleniumStarted);
}
github pouchdb / pouchdb / bin / test-browser.js View on Github external
selenium.install(opts, function (err) {
    if (err) {
      console.error('Failed to install selenium');
      process.exit(1);
    }
    selenium.start(opts, function () {
      sauceClient = wd.promiseChainRemote();
      callback();
    });
  });
}
github pouchdb / upsert / bin / test-browser.js View on Github external
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();
    });
  });
}

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

78 / 100
Full package analysis