подскажите что не так, выдает undefined
Не знаю что не так
async function fetchProductList(url) {
const browser = await puppeteer.launch({
headless: false, // false: enables one to view the Chrome instance in action
defaultViewport: null, // (optional) useful only in non-headless mode
});
const page = await browser.newPage();
await page.goto(url, { waitUntil: 'networkidle2' }).then(() => {
console.log(page.$("#root > div.css-50cyfj > div.css-eovh6h > div:nth-child(2) > div.css-1x7kui0 > div.css-1wws9er > section > a > div > div.css-daun3z > h2").text())
});
}
Селектор правильный