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.35.0 to 2.37.0-2.6

6

conf.js
var path = require('path');
// see https://code.google.com/p/selenium/downloads/list for latest
var version = '2.35.0';
var version = '2.37.0';

@@ -13,5 +13,5 @@ module.exports = {

path: path.join(__dirname, '.selenium', version, 'chromedriver'),
// see https://code.google.com/p/chromedriver/downloads/list
v: '2.3'
// see http://chromedriver.storage.googleapis.com/index.html
v: '2.6'
}
};
var conf = require('./conf.js');
var async = require('async');
var mkdirp = require('mkdirp');
var rimraf = require('rimraf');
var path = require('path');
async.parallel([
installChromeDr.bind(null, conf.chromeDr.path, conf.chromeDr.v),
installSelenium.bind(null, conf.selenium.path, conf.selenium.v)
], function(err) {
async.series([
setup,
download
], end);
function setup(cb) {
async.series([
rimraf.bind(null, path.join(__dirname, '.selenium')),
mkdirp.bind(null, path.dirname(conf.selenium.path))
], cb);
}
function download(cb) {
async.parallel([
installChromeDr.bind(null, conf.chromeDr.path, conf.chromeDr.v),
installSelenium.bind(null, conf.selenium.path, conf.selenium.v)
], cb)
}
function end(err) {
if (err) {
throw err
}
});
}

@@ -18,7 +37,4 @@ function installSelenium(to, version, cb) {

var request = require('request');
var fstream = require('fstream');
var destination = fstream.Writer({
path: to,
type: 'File'
});
var fs = require('fs');
var destination = fs.createWriteStream(to);

@@ -37,4 +53,5 @@ destination.on('error', cb);

var util = require('util');
var request = require('request');
var chromedriverUrl = 'https://chromedriver.googlecode.com/files/chromedriver_%s_%s.zip';
var chromedriverUrl = 'http://chromedriver.storage.googleapis.com/%s/chromedriver_%s.zip';
var platform = getChromeDriverPlatform();

@@ -46,6 +63,6 @@

var dl = util.format(chromedriverUrl, platform, version);
var dl = util.format(chromedriverUrl, version, platform);
console.log('Downloading ' + dl);
downloadAndExtractZip(dl, path.dirname(to), function(err) {
downloadAndExtractZip(dl, to, function(err) {
if (err) {

@@ -61,9 +78,6 @@ return cb(err);

function downloadAndExtractZip(from, to, cb) {
var fstream = require('fstream');
var fs = require('fs');
var request = require('request');
var unzip = require('unzip');
var destination = fstream.Writer({
path: to,
type: 'Directory'
});
var destination = fs.createWriteStream(to);

@@ -76,3 +90,5 @@ destination.on('close', cb);

.pipe(unzip.Parse())
.pipe(destination)
.once('entry', function(file) {
file.pipe(destination);
})
}

@@ -79,0 +95,0 @@

{
"name": "selenium-standalone",
"version": "2.35.0",
"version": "2.37.0-2.6",
"description": "installs a `start-selenium` command line to start a standalone selenium server with chrome-driver",

@@ -9,3 +9,4 @@ "dependencies": {

"async": "~0.2.9",
"fstream": "~0.1.24"
"mkdirp": "~0.3.5",
"rimraf": "~2.2.2"
},

@@ -12,0 +13,0 @@ "bin": {

@@ -9,6 +9,16 @@ # selenium-standalone

```shell
npm install start-selenium -g
npm install selenium-standalone -g
start-selenium
```
`selenium-standalone` versions maps `selenium` versions.
## Example: launch www.google.com
Using a selenium driver like [wd](https://github.com/admc/wd):
```shell
npm install wd -g
wd shell
(wd): browser = wd.remote(); browser.init(function(){browser.get('http://www.google.com')})
```
`selenium-standalone` versions maps `selenium` versions.
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