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.42.0-2.9.0 to 2.42.0-2.9.0-1

34

install.js

@@ -70,5 +70,5 @@ var conf = require('./conf.js');

var dl = util.format(chromedriverUrl, version, platform);
var downloadUrl = util.format(chromedriverUrl, version, platform);
getDownloadStream(dl, function(err, stream) {
getDownloadStream(downloadUrl, function(err, stream) {
if (err) {

@@ -80,3 +80,3 @@ return cb(err);

console.log('Unzipping ' + dl);
console.log('Unzipping ' + downloadUrl);

@@ -91,11 +91,27 @@ stream

})
.once('error', cb.bind(null, new Error('Could not unzip ' + dl)))
.once('error', cb.bind(null, new Error('Could not unzip ' + downloadUrl)))
})
}
function getDownloadStream(dl, cb) {
function getDownloadStream(downloadUrl, cb) {
var proxy = process.env.HTTP_PROXY || process.env.http_proxy;
var requestOpts = downloadUrl;
if (proxy) {
var regexp = /(https?:\/\/)?([^:/]*)/;
requestOpts = {
host: proxy.match(regexp)[2],
port: proxy.match(/:(\d+)/)[1] || 8080,
path: downloadUrl,
headers: {
Host: downloadUrl.match(regexp)[2]
}
};
}
var r =
require('http')
.request(dl, function(res) {
console.log('Downloading ' + dl, res.statusCode);
.request(requestOpts, function(res) {
console.log('Downloading ' + downloadUrl, res.statusCode);

@@ -108,3 +124,3 @@ if (res.statusCode === 302 && res.headers.location) {

if (res.statusCode !== 200) {
return cb(new Error('Could not download ' + dl));
return cb(new Error('Could not download ' + downloadUrl));
}

@@ -114,3 +130,3 @@

})
.once('error', cb.bind(null, new Error('Could not download ' + dl)))
.once('error', cb.bind(null, new Error('Could not download ' + downloadUrl)))

@@ -117,0 +133,0 @@ // initiate request

{
"name": "selenium-standalone",
"version": "2.42.0-2.9.0",
"version": "2.42.0-2.9.0-1",
"description": "installs a `start-selenium` command line to start a standalone selenium server with chrome-driver",

@@ -5,0 +5,0 @@ "main": "index.js",

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