selenium-standalone
Advanced tools
Comparing version 9.0.6 to 9.1.0
@@ -114,2 +114,4 @@ <!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
`opts.processKiller` set for that truthy value, for killing selenium server port. | ||
returns `Promise<ChildProcess>` | ||
@@ -125,4 +127,6 @@ | ||
or use truthy `opts.processKiller` in config | ||
## Set `selenium-standalone` Version as NodeJS environment parameter | ||
You can set any version by `process.env.SELENIUM_VERSION=3.141.59` before starting selenium-standalone. Default values are here: [lib/default-config.js](../lib/default-config.js) |
@@ -52,2 +52,5 @@ <!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
# killing process before starting | ||
selenium-standalone start --processKiller=true | ||
``` | ||
@@ -54,0 +57,0 @@ |
@@ -0,1 +1,7 @@ | ||
# 9.1.0 (2023-08-26) | ||
* added new feature processKiller | ||
# 9.0.6 (2023-08-24) | ||
* support new storage for the latest chromedriver, since v116 (channel: stable, beta, dev, canary) | ||
# 7.1.0 (2021-07-01) | ||
@@ -2,0 +8,0 @@ * support Apple M1 for chrome and gecko drivers #558 |
module.exports = () => { | ||
const config = { | ||
return { | ||
baseURL: 'https://github.com/SeleniumHQ/selenium/releases/download', | ||
version: process.env.SELENIUM_VERSION || '4.9.0', | ||
processKiller: false, | ||
drivers: { | ||
@@ -34,4 +35,2 @@ chrome: { | ||
}; | ||
return config; | ||
}; |
@@ -18,2 +18,3 @@ module.exports = start; | ||
const noop = require('./noop'); | ||
const { processKiller } = require('./processKiller.js'); | ||
@@ -151,4 +152,13 @@ async function start(_opts) { | ||
const seleniumStatusUrl = statusUrl.getSeleniumStatusUrl(args, opts); | ||
if (await isPortReachable(seleniumStatusUrl.port, { timeout: 100 })) { | ||
throw new Error(`Port ${seleniumStatusUrl.port} is already in use.`); | ||
if ('processKiller' in opts && opts.processKiller) { | ||
await processKiller(opts.drivers, seleniumStatusUrl.port); | ||
if (await isPortReachable(seleniumStatusUrl.port, { timeout: 100 })) { | ||
throw new Error(`Port ${seleniumStatusUrl.port} is already in use.`); | ||
} | ||
} else { | ||
throw new Error(`Port ${seleniumStatusUrl.port} is already in use.`); | ||
} | ||
} | ||
@@ -155,0 +165,0 @@ |
{ | ||
"name": "selenium-standalone", | ||
"version": "9.0.6", | ||
"version": "9.1.0", | ||
"description": "installs a `selenium-standalone` command line to install and start a standalone selenium server", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"start": "DEBUG=selenium-standalone:* ./bin/selenium-standalone install && DEBUG=selenium-standalone:* ./bin/selenium-standalone start", | ||
"test": "export SELENIUM_VERSION=4.9.0&& ./bin/selenium-standalone install && mocha --timeout=15000 && export SELENIUM_VERSION=3.141.59&& ./bin/selenium-standalone install && mocha 'test/programmatic.js' --timeout=15000", | ||
"test": "export SELENIUM_VERSION=4.9.0&& ./bin/selenium-standalone install && mocha --timeout=60000 && export SELENIUM_VERSION=3.141.59&& ./bin/selenium-standalone install && mocha 'test/programmatic.js' --timeout=60000", | ||
"docker:build": "run-s docker:build:*", | ||
@@ -21,2 +21,5 @@ "docker:build:latest": "docker build -t webdriverio/${npm_package_name}:latest --cache-from webdriverio/${npm_package_name}:latest .", | ||
}, | ||
"engines": { | ||
"node": ">=12" | ||
}, | ||
"bin": { | ||
@@ -45,2 +48,5 @@ "selenium-standalone": "./bin/selenium-standalone" | ||
"debug": "^4.3.1", | ||
"execa": "^5.1.1", | ||
"find-process": "^1.4.7", | ||
"fkill": "^7.2.1", | ||
"fs-extra": "^10.0.0", | ||
@@ -59,5 +65,5 @@ "got": "^11.8.2", | ||
"devDependencies": { | ||
"chai": "4.3.7", | ||
"chai": "4.3.8", | ||
"doctoc": "2.2.1", | ||
"eslint": "8.47.0", | ||
"eslint": "8.48.0", | ||
"eslint-config-prettier": "9.0.0", | ||
@@ -64,0 +70,0 @@ "eslint-plugin-prettier": "4.2.1", |
⚠️ __ATTENTION:__ we are looking for people taking on maintenance for this package. Read more in [`webdriverio/selenium-standalone#813`](https://github.com/webdriverio/selenium-standalone/issues/813). | ||
Node.js Selenium Standalone [![Test](https://github.com/webdriverio/selenium-standalone/actions/workflows/test.yml/badge.svg?branch=main&event=push)](https://github.com/webdriverio/selenium-standalone/actions/workflows/test.yml) | ||
Node.js Selenium Standalone [![Test](https://github.com/webdriverio/selenium-standalone/actions/workflows/test.yml/badge.svg?branch=main&event=push)](https://github.com/webdriverio/selenium-standalone/actions/workflows/test.yml) ![Supported node versions](https://img.shields.io/badge/node-12%2C%2013%2C%2014%2C%2015%2C%2016%2C%2017%2C%2018%2C%2019%2C%2020-green) | ||
=========================== | ||
@@ -16,3 +16,10 @@ | ||
## Available browsers | ||
By default, Google Chrome, Firefox and Microsoft Edge are available when installed on the host system. | ||
Starting from `v6.22` chrome, edgechromium, and geckodriver support `latest` as version. | ||
Starting from `v9.0.6` support changes regarding new storage for `latest` versions of chromedriver. | ||
## Install & Run | ||
@@ -72,8 +79,2 @@ | ||
## Available browsers | ||
By default, Google Chrome, Firefox and Microsoft Edge are available when installed on the host system. | ||
Starting from `v6.22` chrome, edgechromium, and geckodriver support `latest` as version. | ||
## Tips | ||
@@ -80,0 +81,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
100410
43
1628
96
18
+ Addedexeca@^5.1.1
+ Addedfind-process@^1.4.7
+ Addedfkill@^7.2.1
+ Addedaggregate-error@3.1.0(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedarrify@2.0.1(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedclean-stack@2.2.0(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedcommander@5.1.0(transitive)
+ Addedexeca@3.4.05.1.1(transitive)
+ Addedfind-process@1.4.7(transitive)
+ Addedfkill@7.2.1(transitive)
+ Addedget-stream@6.0.1(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedhuman-signals@1.1.12.1.0(transitive)
+ Addedindent-string@4.0.0(transitive)
+ Addedis-stream@2.0.1(transitive)
+ Addedmerge-stream@2.0.0(transitive)
+ Addedmimic-fn@2.1.0(transitive)
+ Addednpm-run-path@4.0.1(transitive)
+ Addedonetime@5.1.2(transitive)
+ Addedp-finally@2.0.1(transitive)
+ Addedpid-port@0.1.1(transitive)
+ Addedprocess-exists@4.1.0(transitive)
+ Addedps-list@6.3.07.2.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedstrip-final-newline@2.0.0(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedtaskkill@3.1.0(transitive)