nodejs-selenium-runner

A library to download and launch the Selenium Server. Rewrite https://github.com/daaku/nodejs-selenium-launcher, supported run on defined port.

Usage no npm install needed!

<script type="module">
  import nodejsSeleniumRunner from 'https://cdn.skypack.dev/nodejs-selenium-runner';
</script>

README

nodejs-selenium-runner

A library to download and launch the Selenium Server. Rewrite https://github.com/daaku/nodejs-selenium-launcher, supported run on defined port.

Selenium-runner

A library to download and launch the Selenium Server.

var seleniumRunner = require('selenium-runner')
seleniumRunner(function(er, selenium) {
  // selenium is running
  // selenium.host / selenium.port are available
  // selenium is a child process, so you can do selenium.kill()
})

Forcing selenium server version

You can override the selenium server version used by the runner via the environment variable

SELENIUM_VERSION=2.32.0 node app.js

You'll have to supply a valid sha for the version.

A list of selenium-server jar's and their sha can be found on https://code.google.com/p/selenium/downloads/list

Testing

npm test

Many thanks to daaku.