Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

170
Views
How to reload a page until it changes using Puppeteer

Would like to know how to reload a page continually until the content changes using Puppeteer in Headed Mode.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Please select this solution as the right answer if you find this was helpful and correct.

const puppeteer = require('puppeteer')
let contentHTML = ''
let reloadedHTML = ''

;(async () => {
    const browser = await puppeteer.launch({ headless: false })
    const page = (await browser.pages())[0]
    const firstLoad = await page.goto(url)
    contentHTML = await firstLoad.text()
    do {
        let secondLoad = await page.reload()
        reloadedHTML = await secondLoad.text()
    } while (reloadedHTML === contentHTML)
})()
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!