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

292
Views
How to check value of innerText if is null

I am developing a web scrapping and I am trying to solve latest problems with this.

In this case I need to check if innerText is null inside loop.

for(var j = 0; j<linkPlayersNew.length;j++){
                var stats = [];
                for (let i = 2; i <= 23; i++) { 
                    const values = await page.evaluate((nth,nth2) => {
                        const test= parseInt(nth);
                        const test2= parseInt(nth2);                                    
                        return document.querySelector('div.ui-table__row:nth-child('+test2+') > div:nth-child('+test+')').innerText;
                    },i,j+1);
                    stats.push(values);                     
                }           
                data.push(stats);                   
            }
            
            console.log(data);

This works correct but I need to check if innerText is not null inside loop.

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!