4

Using the node puppeteer module, how do I continue with this code to get the innerContent here?

const els = Promise.all(await page.$$(selector)).then(results => {
    results.map(async el => {
      const tr = await el.$('tr')
      //How do I convert this element handle to get its innerText content?
         })
     })
ReduxDJ
  • 480
  • 7
  • 14
  • Possible duplicate of [Puppeteer: Get inner HTML](https://stackoverflow.com/questions/46431288/puppeteer-get-inner-html) – sdgluck Jan 30 '18 at 12:22

1 Answers1

3

Like this

textValue = tr.getProperty('innerText').jsonValue()
Roberto Caboni
  • 7,252
  • 10
  • 25
  • 39
  • I cant edit it anymore, but the updated way is `textValue = await (await tr.getProperty('innerText')).jsonValue()` – Italo José Dec 13 '21 at 21:31