https://github.com/airtap/system
Browser provider for locally installed browsers.
https://github.com/airtap/system
airtap browsers nodejs npm-package
Last synced: 2 months ago
JSON representation
Browser provider for locally installed browsers.
- Host: GitHub
- URL: https://github.com/airtap/system
- Owner: airtap
- License: mit
- Created: 2020-08-23T20:01:23.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-01T18:15:43.000Z (over 1 year ago)
- Last Synced: 2025-06-30T01:38:49.470Z (3 months ago)
- Topics: airtap, browsers, nodejs, npm-package
- Language: JavaScript
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# airtap-system
**[Browser provider](https://github.com/airtap/browser-provider) for locally installed browsers. List and run browsers on your machine. Supports Chrome, Chromium, Firefox, IE, Edge, Brave, Opera and Safari, on Linux, Mac & Windows, with cross-platform headless mode on Chromium, Chrome, Edge, Brave and Firefox.**
[](https://www.npmjs.org/package/airtap-system)
[](https://www.npmjs.org/package/airtap-system)
[](http://travis-ci.com/airtap/system)
[](https://standardjs.com)## Table of Contents
Click to expand
- [Usage](#usage)
- [Programmatic](#programmatic)
- [With Airtap](#with-airtap)
- [API](#api)
- [`System()`](#system)
- [Browser options](#browser-options)
- [Install](#install)
- [License](#license)## Usage
### Programmatic
```js
const System = require('airtap-system')
const system = new System()// Get a list of desired browsers
const wanted = [{ name: 'firefox', version: 79 }]
const manifests = await system.manifests(wanted)// Instantiate a browser
const target = { url: 'http://localhost:3000' }
const browser = system.browser(manifests[0], target)await browser.open()
```If you just want to open a single browser:
```js
const browser = await system.open('chrome', 'https://example.com', {
headless: false
})
```Or find a single browser:
```js
const manifest = await system.find({
name: 'chrome',
channel: 'canary',
supports: { headless: true }
})
```### With [Airtap](https://github.com/airtap/airtap)
```yaml
providers:
- airtap-systembrowsers:
- name: firefox
version: 79
- name: chrome
```This provider also exposes a [`supports`](https://github.com/airtap/browser-manifest#supports) property to match on:
```yaml
browsers:
- name: chrome
supports:
headless: true
```As well as a release `channel` and (Windows-only) `arch`:
```yaml
browsers:
- name: chrome
channel: beta
- name: firefox
channel: nightly
- name: ie
arch: i386
```## API
### `System()`
Constructor. Returns an instance of [`browser-provider`](https://github.com/airtap/browser-provider).
### Browser options
- `headless` (boolean, default true if supported): run in headless mode.
In Airtap these can be set like so:
```yaml
browsers:
- name: chrome
options:
headless: false
```## Install
With [npm](https://npmjs.org) do:
```
npm install airtap-system
```## License
[MIT](LICENSE) © 2020-present Airtap contributors