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

141
Views
puppeteer is not taking screeenshot

I am trying to take screenshot, by creating a function that will take screenshot when a selector is passed but it is giving an error while running the code.

**PS throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails)); ^

Error: Evaluation failed: TypeError: logo.screenshot is not a function at puppeteer_evaluation_script:4:20 at ExecutionContext._evaluateInternal

Node.js v17.6.0**

 function SS(selector){
     return new Promise(function(resolve,reject){
         console.log("1234")
        let waitpromise=page.waitForSelector(selector);
        waitpromise.then(function(){
            console.log("2222", selector);
            let logopromise= page.evaluate(function(selector){
                console.log("evaluate", selector);
        let logo=document.querySelectorAll(selector);
       return logo.screenshot({
            path:'testim.png'  // '$[i].png'
        })
    }) 
about 4 years ago · Juan Pablo Isaza
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!