@authless/puppeteer-extra-plugin-har

This is a plugin for puppeteer-extra that allows you to create a HAR file from your page.

Usage no npm install needed!

<script type="module">
  import authlessPuppeteerExtraPluginHar from 'https://cdn.skypack.dev/@authless/puppeteer-extra-plugin-har';
</script>

README

@authless/puppeteer-extra-plugin-har

This is a plugin for puppeteer-extra that allows you to create a HAR file from your page.

Install

yarn add @authless/puppeteer-extra-plugin-har

Usage

import { PluginHar } from '@authless/puppeteer-extra-plugin-har'
import puppeteer from 'puppeteer-extra'

const main = async () => {
  puppeteer.use(PluginHar({
    callback: (error: Error | null, result: { har: any, targetId: string } | null) => {
      if (result instanceof Object) {
        // inspect HAR object or store it somewhere ...
      }
    }
  }))
}