ms-chromium-edge-driver
NPM wrapper for Webdriver Chromium-based Edge driver
Last updated a day ago by dmlem .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ms-chromium-edge-driver 
SYNC missed versions from official npm registry.

MSEdgeDriver

An NPM wrapper for Chromium-based MS Edge Driver.

The module detects Edge browser version, installed on the local system and downloads the driver of the same version.

Install

npm install ms-chromium-edge-driver

Or download the source and run

node lib/install.js

The package fetches MS Edge browser binary for path and version. Then it downloads the driver of the same version.

The package supports MacOS(darwin) and Windows. Linux based platforms are not supported since there is no MS Edge browser released on it yet.

Usage

import { installDriver } from 'ms-chromium-edge-driver';
import { Builder } from 'selenium-webdriver';
import edge from 'selenium-webdriver/edge';

const edgePaths = await installDriver();
const edgeOptions = new edge.Options();
edgeOptions.setEdgeChromium(true);
edgeOptions.setBinaryPath(edgePaths.browserPath);
const driver = await new Builder()
  .forBrowser('MicrosoftEdge')
  .setEdgeOptions(edgeOptions)
  .setEdgeService(new edge.ServiceBuilder(edgePaths.driverPath))
  .build();

Custom binaries url

To use a mirror of the MSEdgeDriver binaries use PATH variable EDGEDRIVER_CDNURL. Default is https://msedgedriver.azureedge.net.

EDGEDRIVER_CDNURL=https://<mirror address> npm install ms-chromium-edge-driver

Custom browser binary path and driver version

To override the default binary path use the npm config property npm_config_edge_binary_path.

npm install ms-chromium-edge-driver --npm_config_edge_binary_path=/path/to/Microsoft Edge

Another option is to use the PATH variable EDGE_BINARY_PATH

EDGE_BINARY_PATH=C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe

On Windows there is an option to pass custom HKEY by using the PATH variable EDGE_HKEY:

EDGE_HKEY=SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\Current\\Version\\Uninstall\\Microsoft Edge

In addition, custom driver version can be specified with the npm config property npm_config_edgedriver_version

npm install ms-chromium-edge-driver --npm_config_edgedriver_version=80.0.361.103

Another option is to use the PATH variable EDGEDRIVER_VERSION

EDGEDRIVER_VERSION=80.0.361.103

If both browser binary path and version are provided, the package will skip binary fetch step and start with the driver download.

Custom driver binary

To get the msedgedriver from the filesystem instead of a web request use the npm config property npm_config_edgedriver_path.

npm install ms-chromium-edge-driver --npm_config_edgedriver_path=/path/to/msedgedriver.exe

Or add property into your .npmrc file.

npm_config_edgedriver_path=/path/to/msedgedriver.exe

Another option is to use the PATH variable EDGEDRIVER_PATH

EDGEDRIVER_PATH=/path/to/msedgedriver.exe

If both the binary path and driver path are provided, the package will return it skipping browser fetching and driver download steps.

Download driver during npm install

Driver is not downloaded during npm install by default.

To change this behaviour set the npm config property npm_config_edgedriver_download_on_install

npm install ms-chromium-edge-driver --npm_config_edgedriver_download_on_install=1

Another option is to use the PATH variable EDGEDRIVER_DOWNLOAD_ON_INSTALL

EDGEDRIVER_DOWNLOAD_ON_INSTALL=1

License

Licensed under the Apache License, Version 2.0.

Current Tags

  • 0.3.0                                ...           latest (a day ago)

12 Versions

  • 0.3.0                                ...           a day ago
  • 0.2.6                                ...           23 days ago
  • 0.2.5                                ...           2 months ago
  • 0.2.4                                ...           5 months ago
  • 0.2.3                                ...           6 months ago
  • 0.2.2                                ...           6 months ago
  • 0.2.1                                ...           6 months ago
  • 0.2.0                                ...           6 months ago
  • 0.1.0-beta2                                ...           6 months ago
  • 0.1.0-beta1                                ...           6 months ago
  • 0.0.2                                ...           6 months ago
  • 0.0.1                                ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 14
This Month 0
Last Day 2
Last Week 1
Last Month 51
Dependencies (5)
Dev Dependencies (12)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |