Playwright browser provider
npm install airtap-playwrightPlaywright browser provider. List and run Playwright browsers.




Click to expand
- Usage
- Programmatic
- With Airtap
- API
- Playwright()
- Browser options
- Install
- License
``js
const Playwright = require('airtap-playwright')
const provider = new Playwright()
// Get a list of desired browsers
const wanted = [{ name: 'chromium' }]
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()
`
`yaml
providers:
- airtap-playwright
browsers:
- name: chromium
- name: webkit
- name: firefox
`
This provider also exposes a supports property to match on:
`yaml`
browsers:
- name: chromium
supports:
headless: true
Constructor. Returns an instance of browser-provider.
- headless (boolean, default true): run in headless modelaunch
- (object): custom options to pass to launch()context
- (object): custom options to pass to newContext()page
- (object): custom options to pass to newPage()
In Airtap these can be set like so:
`yaml`
browsers:
- name: chromium
options:
headless: false
launch:
args: [--lang=en-US]
With npm do:
```
npm install airtap-playwright
MIT © 2020-present Airtap contributors