ReduxDJ
ReduxDJ

Reputation: 479

how to select innerHTML from an elementHandle in puppeteer

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?
         })
     })

Upvotes: 4

Views: 2331

Answers (1)

Imran Younas
Imran Younas

Reputation: 41

Like this

textValue = tr.getProperty('innerText').jsonValue()

Upvotes: 3

Related Questions