🚀 DAY 4 OF LAUNCH WEEK: Introducing GitHub Actions Scanning Support.Learn more →
Socket
Book a DemoInstallSign in
Socket

airtap-system

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

airtap-system

Browser provider for locally installed browsers

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
67
-18.29%
Maintainers
1
Weekly downloads
 
Created
Source

airtap-system

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.

npm status node Travis build status JavaScript Style Guide

Table of Contents

Click to expand

Usage

Programmatic

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:

const browser = await system.open('chrome', 'https://example.com', {
  headless: false
})

Or find a single browser:

const manifest = await system.find({
  name: 'chrome',
  channel: 'canary',
  supports: { headless: true }
})

With Airtap

providers:
  - airtap-system

browsers:
  - name: firefox
    version: 79
  - name: chrome

This provider also exposes a supports property to match on:

browsers:
  - name: chrome
    supports:
      headless: true

As well as a release channel and (Windows-only) arch:

browsers:
  - name: chrome
    channel: beta
  - name: firefox
    channel: nightly
  - name: ie
    arch: i386

API

System()

Constructor. Returns an instance of browser-provider.

Browser options

  • headless (boolean, default true if supported): run in headless mode.

In Airtap these can be set like so:

browsers:
  - name: chrome
    options:
      headless: false

Install

With npm do:

npm install airtap-system

License

MIT © 2020-present Airtap contributors

Keywords

airtap

FAQs

Package last updated on 07 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts