# airtap-sauce

> Sauce Labs browser provider

Latest version **1.1.2** (published 2021-04-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install airtap-sauce
pnpm add airtap-sauce
yarn add airtap-sauce
bun add airtap-sauce
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2021-04-24 |
| First published | 2020-08-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.2 |
| Dependencies | 10 |
| Unpacked size | 18.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Vincent Weevers |
| Maintainers | vweevers |
| Keywords | airtap, browser, browser-provider, sauce, sauce-labs, test |

## Links

- npm: https://www.npmjs.com/package/airtap-sauce
- Repository: https://github.com/airtap/sauce
- Issues: https://github.com/airtap/sauce/issues
- npm.io page: https://npm.io/package/airtap-sauce

## Dependencies (10)

- [wd](https://npm.io/package/wd.md) ^1.12.0
- [uuid](https://npm.io/package/uuid.md) ^8.3.0
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [build-number](https://npm.io/package/build-number.md) ^1.0.0
- [firefox-profile](https://npm.io/package/firefox-profile.md) ^4.0.0
- [transient-error](https://npm.io/package/transient-error.md) ^1.0.0
- [abstract-browser](https://npm.io/package/abstract-browser.md) ^1.0.0
- [browser-provider](https://npm.io/package/browser-provider.md) ^1.1.0
- [airtap-sauce-browsers](https://npm.io/package/airtap-sauce-browsers.md) ^0.2.2
- [sauce-connect-launcher](https://npm.io/package/sauce-connect-launcher.md) ^1.3.2

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2021-04-24
- 1.1.1 — 2021-04-24
- 1.1.0 — 2020-09-23
- 1.0.0 — 2020-08-23

## README

# airtap-sauce

**Sauce Labs [browser provider](https://github.com/airtap/browser-provider). List and run browsers on [Sauce Labs](https://saucelabs.com/).**

[![npm status](http://img.shields.io/npm/v/airtap-sauce.svg)](https://www.npmjs.org/package/airtap-sauce)
[![node](https://img.shields.io/node/v/airtap-sauce.svg)](https://www.npmjs.org/package/airtap-sauce)
[![Sauce Labs integration status](https://github.com/airtap/sauce/workflows/Sauce%20Labs/badge.svg)](https://github.com/airtap/sauce/actions?query=workflow%3A%22Sauce+Labs%22)
[![Lint](https://github.com/airtap/sauce/workflows/Lint/badge.svg)](https://github.com/airtap/sauce/actions?query=workflow%3ALint)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Table of Contents

<details><summary>Click to expand</summary>

- [Usage](#usage)
  - [Programmatic](#programmatic)
  - [With Airtap](#with-airtap)
- [API](#api)
  - [`Sauce([options])`](#sauceoptions)
  - [Browser options](#browser-options)
- [Install](#install)
- [Big Thanks](#big-thanks)
- [License](#license)

</details>

## Usage

### Programmatic

```js
const Sauce = require('airtap-sauce')
const provider = new Sauce()

// Get a list of desired browsers
const wanted = [{ name: 'android', version: '5..latest' }]
const manifests = await provider.manifests(wanted)

// Instantiate a browser
const target = { url: 'http://localhost:3000' }
const browser = provider.browser(manifests[0], target)

await browser.open()
```

### With [Airtap](https://github.com/airtap/airtap)

```yaml
providers:
  - airtap-sauce

browsers:
  - name: android
    version: 5..latest
```

This provider also exposes `platform`, `capabilities` and [more properties](https://github.com/airtap/sauce-browsers) to match on:

```yaml
browsers:
  - name: chrome
    version: 69
    platform: mac 10.15
```

## API

### `Sauce([options])`

Constructor. Returns an instance of [`browser-provider`](https://github.com/airtap/browser-provider). Options:

- `username` (string): defaults to `process.env.SAUCE_USERNAME`
- `key` (string): defaults to `process.env.SAUCE_ACCESS_KEY`
- `hostname` (string): defaults to `'ondemand.saucelabs.com'`
- `port` (number): defaults to `80`
- `tunnel` (object): custom options for [`sauce-connect-launcher`](https://github.com/bermi/sauce-connect-launcher)

In Airtap these can be set like so:

```yaml
providers:
  - airtap-sauce:
      tunnel:
        connectRetries: 10
```

### Browser options

- `name` (string): name for Sauce Labs job, defaults to browser manifest name
- `profile` (object, only on Firefox): custom user profile to programmatically configure anything that can be changed in `about:config`
- `capabilities` (object): custom Selenium capabilities.

In Airtap these can be set like so:

```yaml
browsers:
  - name: firefox
    options:
      name: my-custom-job-name
      profile:
        webgl.force-enabled: true
```

## Install

With [npm](https://npmjs.org) do:

```
npm install airtap-sauce
```

## Big Thanks

Cross-browser Testing Platform and Open Source ♥ Provided by [Sauce Labs](https://saucelabs.com).

[![Sauce Labs logo](./sauce-labs.svg)](https://saucelabs.com)

## License

[MIT](LICENSE) © 2018 [Roman Shtylman](https://github.com/defunctzombie), [Zuul contributors](https://github.com/defunctzombie/zuul/graphs/contributors) and [Airtap contributors](https://github.com/airtap)

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