How to use the pending-xhr-puppeteer.waitForAllXhrFinished function in pending-xhr-puppeteer

To help you get started, we’ve selected a few pending-xhr-puppeteer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shirshak55 / scrapper-tools / src / waitForXhr.ts View on Github external
export default async (page, no_of_xhr_request = 1) => {
  const p = new pendingXHR(page)
  await Promise.all([
    pWaitFor(() => p.finishedWithSuccessXhrs.size >= no_of_xhr_request),
    pendingXHR.waitForAllXhrFinished(),
  ])
}

pending-xhr-puppeteer

Small tool for wait that all xhr are finished in pupeteer

MIT
Latest version published 4 years ago

Package Health Score

48 / 100
Full package analysis