The Browser Object
Browser
A browser is an instance of a Chromium, Firefox or Webkit browser. Normally, the instance is created by launching it, and closing it when it is not longer used.
const { chromium } = require('playwright'); // 'chromium', 'firefox', 'webkit'.
const browser = await chromium.launch();
await browser.close();
Options
Some of the most used arguments are presented:
| Argument | Type | Type |
|---|---|---|
| headless | boolean | Run browser in headless (no UI) mode |
| executablePath | string | Run specific installed browser in path |
| slowMo | number | Slows down Playwright in x milliseconds to watch the process |
The full list of arguments can be found at the official documentation official documentation