I have scraped an element by using this code:
const text = await page.evaluate(() => Array.from(document.querySelectorAll(`tr`), element => element.text