Answers for "puppeteer print page numbers after second page"

0

puppeteer print page numbers after second page

if (!this.browser) {
    this.browser = await puppeteer.launch(this.OPT)
    const pages: puppeteer.Page[] = await this.browser.pages()

    // close chromium by catching 'targetdestryed'
    this.browser.on('targetdestroyed', async () => {
      if (this.browser) {
        const pages: puppeteer.Page[] = await this.browser.pages()
        if (pages.length === 0) {
          process.exit(0)
        }
      }
    })
  }
Posted by: Guest on February-17-2021

Code answers related to "puppeteer print page numbers after second page"

Code answers related to "Javascript"

Browse Popular Code Answers by Language