1. airtap-system
Browser provider for locally installed browsers
airtap-system
Package: airtap-system
Created by: airtap
Last modified: Mon, 11 Apr 2022 13:06:00 GMT
Version: 0.1.0
License: MIT
Downloads: 306
Repository: https://github.com/airtap/system

Install

npm install airtap-system
yarn add airtap-system

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

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code