Gathering detailed insights and metrics for wdio-selenoid-standalone-service
Gathering detailed insights and metrics for wdio-selenoid-standalone-service
Gathering detailed insights and metrics for wdio-selenoid-standalone-service
Gathering detailed insights and metrics for wdio-selenoid-standalone-service
npm install wdio-selenoid-standalone-service
Typescript
Module System
Node Version
NPM Version
JavaScript (66.26%)
TypeScript (33.74%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
5 Stars
6 Commits
2 Forks
1 Watchers
7 Branches
1 Contributors
Updated on Feb 15, 2023
Latest Version
1.0.0
Package Id
wdio-selenoid-standalone-service@1.0.0
Unpacked Size
49.33 kB
Size
13.27 kB
File Count
12
NPM Version
6.14.6
Node Version
12.18.4
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
Using Selenium Standalone, ChromeDriver etc are great ways to run automated tests on your machine or CI, but they use the locally installed browser to execute the tests. What happens if you don't have that browser on your machine? Or if you want to test a different version of the browser than you have installed? Selenoid to the rescue!
From Aerokube Selenoid Selenoid is "A lightning fast Selenium protocol implementation running browsers in Docker containers"
As long as you have docker installed, you can run any of the available images provided free of charge by Selenoid.
Note: If you use this service you don't need any other driver services (e.g. wdio-chromedriver-service) anymore. All browsers supported by selenoid can be started using this service.
Note: You might notice we pull the version of selenoid with VNC enabled. To take advantage of this, please check out the wdio-selenoid-ui-service for more information.
Before starting make sure you have Docker installed
The easiest way is to keep wdio-selenoid-standalone-service
as a devDependency in your package.json
.
1{ 2 "devDependencies": { 3 "wdio-selenoid-standalone-service": "^1.0.0" 4 } 5}
You can simple do it by:
1npm install wdio-selenoid-standalone-service --save-dev
or
1yarn add wdio-selenoid-standalone-service --dev
Instructions on how to install WebdriverIO
can be found here.
In order to use the service you need to add selenoid-standalone
to your service array and change the default wdio path prop to match selenoid
1export.config = { 2 // ... 3 path: 'wd/hub' 4 services: [ 5 ['selenoid-standalone', { pathToBrowsersConfig: './browsers.json' }] // path relative to process.cwd() 6 ], 7 // ... 8};
Next you need to create the browsers.json
file which is a configuration file that tells Selenoid which browsers you want to support. An example for chrome 88, 87 and FireFox 85 would be:
1{ 2 "chrome": { 3 "default": "88.0", 4 "versions": { 5 "88.0": { 6 "image": "selenoid/vnc:chrome_88.0", 7 "port": "4444", 8 "path": "/" 9 }, 10 "87.0": { 11 "image": "selenoid/vnc:chrome_87.0", 12 "port": "4444", 13 "path": "/" 14 } 15 } 16 }, 17 "firefox": { 18 "default": "85.0", 19 "versions": { 20 "88.0": { 21 "image": "selenoid/vnc:firefox_85.0", 22 "port": "4444", 23 "path": "/wd/hub" 24 } 25 } 26 } 27}
The default value for each browser is what browser will be run if you do not supply a browserVersion
prop within your capabilities.
Note: Pay attention to the path
as these can change depending on the browser image being used
More information about browsers.json can be found here
The following options can be added to the service options. They are all optional
Automatically pull docker images added to browsers.json
that do not exist on your system
Type: Boolean
Default: false
When this service runs the selenoid docker image it will give it a custom name. If you want to use your own name, you can override it here
Type: String
Default: wdio_selenoid
As this service should be the only browser driver needed, if there is a problem starting it will issue a SevereServiceError
execption and stop wdio from running. If you want to disable this behaviour set this to false
Type: Boolean
Default: true
If you want to always use a specific version of Selenoid, you can fix the version here. If unset, this service will use the image tagged with latest-release
Type: String
Default: latest-release
Port which the Selenoid container should use to accept incoming connections
Type: Number
Default: 4444
The following options are experimental and can cause unexpected problems. Use with caution
Any additional arguments you want to pass to docker run when starting the container. docker run options
Type: String[]
Default: null
Any additional arguments you want to pass to selenoid when starting the container. docs
Type: String[]
Default: null
1export.config = { 2 // ... 3 path: 'wd/hub' 4 services: [ 5 [ 6 'selenoid-standalone', { 7 pathToBrowsersConfig: './browsers.json', 8 skipAutoPullImages: 'false', 9 customSelenoidContainerName: 'wdio-selenoid', 10 terminateWdioOnError: true, 11 selenoidVersion: 'latest-version', 12 port: 4444, 13 dockerArgs: ['-rm'], 14 selenoidArgs: ['-limit', '10'], 15 }, 16 ], 17 ], 18 // ... 19};
As the browsers are now running inside a docker container, localhost is local to the container. If you want to access localhost of the docker host, change the url from localhost to host.docker.internal
. Example https://localhost:3000
becomes https://host.docker.internal:3000
You need to set path: 'wb/hub'
in your wdio.conf.js
file as wdio will default to a path of /
which Selenoid doesn't
browers.json
is referencing a browser that is not supported by selenoid. Supported list can be found here
Update the browsers.json
file and change the image name to also include your mirror and this will be passed to docker when selecting the image
1{ 2 "chromex": { 3 "default": "88.0", 4 "versions": { 5 "88.0": { 6 "image": "my-docker-mirror.internal/selenoid/vnc:chrome_88.0", 7 "port": "4444", 8 "path": "/" 9 } 10 } 11 } 12}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/6 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
27 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More