airtap-playwright
Playwright browser provider. List and run Playwright browsers.
Table of Contents
Click to expand
Usage
Programmatic
const Playwright = const provider = // Get a list of desired browsersconst wanted = name: 'chromium' const manifests = await provider // Instantiate a browserconst target = url: 'http://localhost:3000' const browser = provider await browser
Airtap
Withproviders: - airtap-playwright browsers: - name: chromium - name: webkit - name: firefox
This provider also exposes a supports
property to match on:
browsers: - name: chromium supports: headless: true
API
Playwright()
Constructor. Returns an instance of browser-provider
.
Browser options
headless
(boolean, default true): run in headless modelaunch
(object): custom options to pass tolaunch()
context
(object): custom options to pass tonewContext()
page
(object): custom options to pass tonewPage()
In Airtap these can be set like so:
browsers: - name: chromium options: headless: false launch: args: [--lang=en-US]
Install
With npm do:
npm install airtap-playwright
License
MIT © 2020-present Airtap contributors