Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

selenium-standalone

Package Overview
Dependencies
Maintainers
1
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

selenium-standalone - npm Package Compare versions

Comparing version 2.39.0-2.9.0 to 2.40.0-2.9.0

4

conf.js
var path = require('path');
// see https://code.google.com/p/selenium/downloads/list for latest
var version = '2.39.0';
// see http://selenium-release.storage.googleapis.com/index.html for latest
var version = '2.40.0';

@@ -6,0 +6,0 @@ module.exports = {

@@ -9,3 +9,4 @@ var conf = require('./conf.js');

setup,
download
download,
chmodChromeDr.bind(null, conf.chromeDr.path)
], end);

@@ -28,2 +29,3 @@

function end(err) {
console.log('Installation finished');
if (err) {

@@ -35,22 +37,29 @@ throw err

function installSelenium(to, version, cb) {
var seleniumStandaloneUrl = 'https://selenium.googlecode.com/files/selenium-server-standalone-%s.jar'
var util = require('util');
var dl = util.format(seleniumStandaloneUrl, version);
var request = require('request');
var fs = require('fs');
var destination = fs.createWriteStream(to);
var seleniumStandaloneUrl =
'http://selenium-release.storage.googleapis.com/%s/selenium-server-standalone-%s.jar';
destination.on('error', cb);
destination.on('close', cb);
var dl = require('util').format(seleniumStandaloneUrl,
version.slice(0, version.lastIndexOf('.')),
version);
console.log('Downloading ' + dl);
request(dl)
.on('error', cb)
.pipe(destination);
getDownloadStream(dl, function(err, stream) {
if (err) {
return cb(err);
}
stream
.pipe(require('fs').createWriteStream(to))
.once('error', cb.bind(null, new Error('Could not write to ' + to)))
.once('finish', cb);
});
}
function chmodChromeDr(where, cb) {
console.log('chmod+x chromedriver');
require('fs').chmod(where, 0755, cb);
}
function installChromeDr(to, version, cb) {
var path = require('path');
var util = require('util');
var request = require('request');

@@ -66,4 +75,3 @@ var chromedriverUrl = 'http://chromedriver.storage.googleapis.com/%s/chromedriver_%s.zip';

console.log('Downloading ' + dl);
downloadAndExtractZip(dl, to, function(err) {
getDownloadStream(dl, function(err, stream) {
if (err) {

@@ -73,22 +81,34 @@ return cb(err);

var fs = require('fs');
fs.chmod(to, '0755', cb);
});
var unzip = require('unzip');
console.log('Unzipping ' + dl);
stream
.pipe(require('unzip').Parse())
.once('entry', function(file) {
file
.pipe(require('fs').createWriteStream(to))
.once('error', cb.bind(null, new Error('Could not write to ' + to)))
.once('finish', cb)
})
.once('error', cb.bind(null, new Error('Could not unzip ' + dl)))
})
}
function downloadAndExtractZip(from, to, cb) {
var fs = require('fs');
var request = require('request');
var unzip = require('unzip');
var destination = fs.createWriteStream(to);
function getDownloadStream(dl, cb) {
var r =
require('http')
.request(dl, function(res) {
console.log('Downloading ' + dl);
destination.on('close', cb);
destination.on('error', cb);
if (res.statusCode !== 200) {
return cb(new Error('Could not download ' + dl));
}
request(from)
.on('error', cb)
.pipe(unzip.Parse())
.once('entry', function(file) {
file.pipe(destination);
})
cb(null, res);
})
.once('error', cb.bind(null, new Error('Could not download ' + dl)))
// initiate request
r.end();
}

@@ -95,0 +115,0 @@

{
"name": "selenium-standalone",
"version": "2.39.0-2.9.0",
"version": "2.40.0-2.9.0",
"description": "installs a `start-selenium` command line to start a standalone selenium server with chrome-driver",
"dependencies": {
"request": "~2.27.0",
"unzip": "~0.1.9",
"async": "~0.2.9",
"async": "~0.2.10",
"mkdirp": "~0.3.5",
"rimraf": "~2.2.2"
"rimraf": "~2.2.6"
},

@@ -22,5 +21,5 @@ "main": "index.js",

"devDependencies": {
"mocha": "~1.16.2",
"faucet": "0.0.0"
"mocha": "~1.17.1",
"faucet": "0.0.1"
}
}

@@ -1,2 +0,2 @@

# selenium-standalone
# selenium-standalone [![Dependency Status](https://david-dm.org/vvo/selenium-standalone.svg?theme=shields.io)](https://david-dm.org/vvo/selenium-standalone) [![devDependency Status](https://david-dm.org/vvo/selenium-standalone/dev-status.svg?theme=shields.io)](https://david-dm.org/vvo/selenium-standalone#info=devDependencies)

@@ -6,6 +6,6 @@ Intalls a `start-selenium` command line starting a selenium standalone

Currently installs selenium `2.39.0` and chrome driver `2.8`.
Currently installs selenium `2.40.0` and chrome driver `2.9`.
```shell
npm install --production selenium-standalone -g
npm install --production selenium-standalone@latest -g
start-selenium

@@ -12,0 +12,0 @@ ```

describe('programmatic use', function () {
it('should start', function(done) {
this.timeout(100000);
this.timeout(20000);
var selenium = require('./index.js');

@@ -5,0 +5,0 @@ var proc = selenium.start({ stdio: 'pipe' });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc