JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 17003
  • Score
    100M100P100Q160445F
  • License MIT

Generate HAR file with Puppeteer

Package Exports

  • puppeteer-har

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (puppeteer-har) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

puppeteer-har

npm version

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)

har.start([options])

  • options <?Object> Optional
    • path <string> If set HAR file will be written at this path
  • returns: <Promise>

har.stop()

  • returns: <Promise<?Object>> If path is not set in har.start Promise will return object with HAR.