# safaridriver

> An NPM wrapper for handling the Safaridriver binary.

Latest version **2.0.0** (published 2026-09-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install safaridriver
pnpm add safaridriver
yarn add safaridriver
bun add safaridriver
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2026-09-22 |
| First published | 2023-01-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.0.0 |
| Dependencies | 0 |
| Unpacked size | 10.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Author | Christian Bromann |
| Maintainers | wdio-user |
| Keywords | safari, safaridriver, webdriver, webdriverio, selenium |

## Links

- npm: https://www.npmjs.com/package/safaridriver
- Repository: https://github.com/webdriverio/driver
- Homepage: https://github.com/webdriverio/driver/tree/main/packages/node-safaridriver#readme
- Issues: https://github.com/webdriverio/driver/issues
- npm.io page: https://npm.io/package/safaridriver

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2026-09-22
- 1.0.1 — 2025-12-30
- 1.0.0 — 2024-11-02
- 0.1.2 — 2024-01-02
- 0.1.1 — 2023-12-12
- 0.1.0 — 2023-07-30
- 0.0.6 — 2023-07-15
- 0.0.5 — 2023-05-17
- 0.0.4 — 2023-01-07
- 0.0.3 — 2023-01-07
- 0.0.2 — 2023-01-07
- 0.0.1 — 2023-01-03

## README

# Safaridriver for Node.js [![CI](https://github.com/webdriverio/driver/actions/workflows/ci.yml/badge.svg)](https://github.com/webdriverio/driver/actions/workflows/ci.yml) [![Audit](https://github.com/webdriverio/driver/actions/workflows/audit.yml/badge.svg)](https://github.com/webdriverio/driver/actions/workflows/audit.yml)

> A Node.js utility to manage Safaridriver sessions.

The Safaridriver utility is used to launch an HTTP server that implements the [WebDriver](https://w3c.github.io/webdriver/) REST API. When launched, Safaridriver allows for automated testing of web content using the version of Safari that is installed with macOS.

## Install

To install the package, run:

```sh
npm install --save-dev safaridriver
```

## Usage

To start a Safaridriver server, import the package and run:

```js
import safaridriver from 'safaridriver'

safaridriver.start()

// run some automation...

// then kill instance via:
safaridriver.stop()
```

## Options

### `port`

Specifies the port on which the HTTP server should listen for incoming connections. If the port is already in use or otherwise unavailable, Safaridriver will exit immediately with a non-zero return code.

__Type:__ `number`<br />
__Default:__ `4444`

### `path`

Path to Safaridriver binary.

__Type:__ `string`<br />
__Default:__ `/usr/bin/safaridriver`

### `useTechnologyPreview`

If set to `true`, it will start the Safaridriver for Safari Technology Preview. Make sure you have it installed by installing Safari Technology Preview on Apple's [official website](https://developer.apple.com/safari/technology-preview/).

__Type:__ `boolean`<br />
__Default:__ `false`

### `enable`

Applies configuration changes so that subsequent WebDriver sessions will run without further authentication. This includes checking "Enable Remote Automation" in Safari's `Develop` menu. The user must authenticate via password for the changes to be applied.

When this option is specified, safaridriver exits immediately without starting up the REST API service. If the changes were successful or already applied, safaridriver exits 0; otherwise, safaridriver exits >0 and prints an error message to stderr.

__Type:__ `boolean`<br />
__Default:__ `false`

### `diagnose`

Enables diagnostic logging for all sessions hosted by this safaridriver instance.

__Type:__ `boolean`<br />
__Default:__ `false`

----

For more information on WebdriverIO see the [homepage](https://webdriver.io).

---
_Source: https://npm.io/package/safaridriver · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
