1.2.1 • Published 3 years ago

puppeteer-har-fetch v1.2.1

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

puppeteer-har-fetch

npm version

Generate HAR file with puppeteer.

Install

npm install puppeteer-har-fetch

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
    • useFetch <bool> Will save response bodies using experimental Fetch domain.
  • returns: <Promise>

har.stop()

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

3 years ago

1.2.0

3 years ago

1.1.11

3 years ago

1.1.10

3 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago