Git Product home page Git Product logo

nodejs-selenium-launcher's Introduction

selenium-launcher Build Status

A library to download and launch the Selenium Server.

var seleniumLauncher = require('selenium-launcher')
seleniumLauncher(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 launcer via the environment variable

SELENIUM_VERSION=2.32.0:c94e6d5392b687d3a141a35f5a489f50f01bef6a 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

nodejs-selenium-launcher's People

Contributors

aearly avatar bermi avatar daaku avatar dependabot[bot] avatar geebee avatar jbpros avatar paulbjensen avatar timonv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nodejs-selenium-launcher's Issues

Selenium 2.44.0 does not work with Firefox

Hi, this is more of a "for your info" than anything else, can close right away. I'm trying to use the latest version in Dashku, but I discovered that Selenium 2.44.0 does not work with Firefox.

I've read the docs and discovered that you can override the version to use (thanks).

Also, there's a typo (launcer) in the README, and I'd also suggest using the svg for the badge, as the png is blurry on retina screens.

Thanks again for making this tool.

Doesn't run on port 4444 & Keeps downloading very time

Hi

I can run selenium-server-standalone manually and run this line (in my app):

var driver = require('./drivers/seleniumserver.js')(webdriver, {'browserName': 'chrome'});

And it works great.

I'd like to use your launcher, and I was hoping that if I didn't have selenium, it would download it, and if I did, it would start it on port 4444 and keep it running, until I closed it.

I'm using your example from the test file and every time I try to start with port 4444 like this:

process.env.SELENIUM_LAUNCHER_PORT = '4444';
require('selenium-launcher')(function(er, selenium) {
    console.log(selenium);
    var driver = require('./drivers/seleniumserver.js')(webdriver, {'browserName': 'chrome', port: selenium.port});
    driver.get('http://localhost:8000');
});

I get:

{ domain: null,
  _events: {},
  _maxListeners: 10,
  host: '127.0.0.1',
  port: '4444' }

/Users/sam/WebstormProjects/real-time-with-meteor/test/node_modules/selenium-webdriver/lib/webdriver/promise.js:1609
      throw error;
            ^
Error: ECONNREFUSED connect ECONNREFUSED

And if I take off the SELENIUM_LAUNCHER_PORT, it starts downloading again (does it every time).

Is it a bug or is it the way I'm using it?

Thanks

Sam

No method launch

Using the code example in the README I get the error:

    require('selenium-launcher').launch(function(er, selenium) {
                                 ^
    TypeError: Object function (cb) {
      if (process.env.SELENIUM_LAUNCHER_PORT) {
        return process.nextTick(
          cb.bind(null, null, new FakeProcess(process.env.SELENIUM_LAUNCHER_PORT)))
      }

      download(url, outfile, expectedSha, function(er) {
        if (er) return cb(er)
        run(cb)
      })
    } has no method 'launch'

Add a license

Hi Naitik!

Thank you for your OSS contributions! We use your library at my company, but they need for us to know what License you are releasing this software as. Would you be willing to add a license to your package.json or in your README.md? I have personally always released my software under MIT, but obviously use whatever license you prefer, we just need to know what you have chosen so we can continue to use your software.

If you can provide information about if the license you choose applied to your previously released versions as well (and not just going forward) that would be awesome.

Thank you for your consideration!

Cheers,
Nowell

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.