const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://example.com');
const getPtag = await page.$('p');
const getInnerHTMLProperty = await getPtag.getProperty('innerText');
const getPtagValues = await getInnerHTMLProperty.jsonValue();
console.log(getPtagValues);
await browser.close();
})();