Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
edgedriver
Advanced tools
An NPM wrapper for Microsofts' EdgeDriver. It manages to download various (or the latest) Edgedriver versions and provides a programmatic interface to start and stop it within Node.js. Note: this is a wrapper module. If you discover any bugs with EdgeDriver, please report them in the official repository.
You can install this package via:
npm install edgedriver
Once installed you can start Edgedriver via:
npx edgedriver --port=4444
By default, this package downloads Edgedriver when used for the first time through the CLI or the programmatical interface. If you like to download it as part of the NPM install process, set the EDGEDRIVER_AUTO_INSTALL
environment flag, e.g.:
EDGEDRIVER_AUTO_INSTALL=1 npm i
To get a list of available CLI options run npx edgedriver --help
. By default this package tries to find the Mircosoft Edge version installed on a given system. If you prefer to have it install a custom EdgeDriver version you can define the environment variable EDGEDRIVER_VERSION
when running in CLI, e.g.:
$ npm i edgedriver
$ EDGEDRIVER_VERSION=105.0.1343.33 ./bin/edgedriver.js --version
Microsoft Edge WebDriver 105.0.1343.33 (4122bb4646b33f33bca5d269490b9caadfc452b2)
You can import this package with Node.js and start the driver as part of your script and use it e.g. with WebdriverIO.
The package exports a start
and download
method.
start
Starts an EdgeDriver instance and returns a ChildProcess
. If EdgeDriver is not downloaded it will download it for you.
Params: EdgedriverParameters
- options to pass into EdgeDriver (see below)
Example:
import { start } from 'edgedriver';
import { remote } from 'webdriverio';
import waitPort from 'wait-port';
/**
* first start EdgeDriver
*/
const cp = await start({ port: 4444 });
/**
* wait for EdgeDriver to be up
*/
await waitPort({ port: 4444 });
/**
* then start WebdriverIO session
*/
const browser = await remote({ capabilities: { browserName: 'msedge' } });
await browser.url('https://webdriver.io');
console.log(await browser.getTitle()); // prints "WebdriverIO · Next-gen browser and mobile automation test framework for Node.js | WebdriverIO"
/**
* kill Edgedriver process
*/
cp.kill();
Note: as you can see in the example above this package does not wait for the driver to be up, you have to manage this yourself through packages like wait-on
.
download
Method to download an EdgeDriver with a particular version. If version parameter is omitted it tries to detect the version based on the Edge browser installed on the system.
Params: string
- version of Edgedriver to download (optional)
In case your module uses CJS you can use this package as follows:
const { start } = require('edgedriver')
// see example above
The start
method offers the following options to be passed on to the actual Edgedriver CLI.
The version of EdgeDriver to start. See https://msedgedriver.azureedge.net/ for all available versions, platforms and architecture.
Type: number
Default: latest
The port on which the driver should run.
Example: 9515
Type: number
The port on which the ADB driver should run.
Example: 9515
Type: number
Base URL path prefix for commands, e.g. wd/url
.
Example: /
Type: string
Write server log to file instead of stderr, increases log level to INFO
Type: string
Set log level. Possible options ALL
, DEBUG
, INFO
, WARNING
, SEVERE
, OFF
.
Type: string
Log verbosely (equivalent to --log-level=ALL
)
Type: boolean
Log nothing (equivalent to --log-level=OFF
)
Type: boolean
Append log file instead of rewriting.
Type: boolean
Log verbosely and don't truncate long strings so that the log can be replayed (experimental).
Type: boolean
Add readable timestamps to log.
Type: boolean
Show logs from the browser (overrides other logging options).
Type: boolean
Custom bidi mapper path.
Type: string
Comma-separated allowlist of remote IP addresses which are allowed to connect to EdgeDriver.
Type: string[]
Comma-separated allowlist of request origins which are allowed to connect to EdgeDriver. Using *
to allow any host origin is dangerous!
Type: string[]
For more information on WebdriverIO see the homepage.
FAQs
Microsofts' EdgeDriver for Node.js
The npm package edgedriver receives a total of 383,867 weekly downloads. As such, edgedriver popularity was classified as popular.
We found that edgedriver demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.