edgedriver
Advanced tools
Comparing version 5.1.0 to 5.2.0
@@ -5,2 +5,6 @@ exports.start = async function start(params) { | ||
}; | ||
exports.download = async function download(params) { | ||
const esmPkg = await import('../index.js'); | ||
return esmPkg.download(params); | ||
}; | ||
//# sourceMappingURL=index.js.map |
/// <reference types="node" /> | ||
import cp from 'node:child_process'; | ||
import { download as downloadDriver } from './install.js'; | ||
import type { EdgedriverParameters } from 'types.js'; | ||
export declare function start(params: EdgedriverParameters): Promise<cp.ChildProcessWithoutNullStreams>; | ||
export declare const download: typeof downloadDriver; | ||
export * from './types.js'; | ||
//# sourceMappingURL=index.d.ts.map |
import url from 'node:url'; | ||
import path from 'node:path'; | ||
import cp from 'node:child_process'; | ||
import { download } from './install.js'; | ||
import { download as downloadDriver } from './install.js'; | ||
import { hasAccess, parseParams } from './utils.js'; | ||
@@ -10,3 +10,3 @@ import { BINARY_FILE } from './constants.js'; | ||
if (!params.customEdgeDriverPath) { | ||
await download(params.edgeDriverVersion); | ||
await downloadDriver(params.edgeDriverVersion); | ||
} | ||
@@ -20,3 +20,4 @@ const targetDir = path.resolve(__dirname, '..', '.bin'); | ||
} | ||
export const download = downloadDriver; | ||
export * from './types.js'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "edgedriver", | ||
"version": "5.1.0", | ||
"version": "5.2.0", | ||
"description": "Microsofts' EdgeDriver for Node.js", | ||
@@ -5,0 +5,0 @@ "homepage": "https://webdriver.io", |
@@ -36,4 +36,16 @@ EdgeDriver | ||
You can import this package with Node.js and start the driver as part of your script and use it e.g. with [WebdriverIO](https://webdriver.io): | ||
You can import this package with Node.js and start the driver as part of your script and use it e.g. with [WebdriverIO](https://webdriver.io). | ||
## Exported Methods | ||
The package exports a `start` and `download` method. | ||
### `start` | ||
Starts an EdgeDriver instance and returns a [`ChildProcess`](https://nodejs.org/api/child_process.html#class-childprocess). If EdgeDriver is not downloaded it will download it for you. | ||
__Params:__ `EdgedriverParameters` - options to pass into EdgeDriver (see below) | ||
__Example:__ | ||
```js | ||
@@ -69,2 +81,8 @@ import { start } from 'edgedriver'; | ||
### `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) | ||
## CJS Support | ||
@@ -71,0 +89,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
46413
488
183