Newfangled Package Modernizer
    Wondering what’s next for npm?Check out our public roadmap! »

    puppeteer-har

    1.1.2 • Public • Published

    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.

    Install

    npm i puppeteer-har

    DownloadsWeekly Downloads

    8,305

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    7.26 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar