puppeteer-har
v1.1.2
Published
Generate HAR file with Puppeteer
Downloads
125,768
Maintainers
Readme
puppeteer-har
Generate HAR file with puppeteer.
Install
npm install puppeteer-har
Usage
const puppeteer = require('puppeteer');
const PuppeteerHar = require('puppeteer-har');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
const har = new PuppeteerHar(page);
await har.start({ path: 'results.har' });
await page.goto('http://example.com');
await har.stop();
await browser.close();
})();
PuppeteerHar(page)
page
<Page>
har.start([options])
options
<?Object> Optionalpath
<string> If set HAR file will be written at this path
- returns: <Promise>