0

what should the code of the SelectorAll + xPath document look like?
Bellow my actually code, but not working:

 const resultPagination = await page.evaluate(() =>
      Array.from(
        document.querySelectorAll(
          `[//*[@id="__next"]/div[2]/main/div[1]/div[3]/div[1]/div[2]/div[1]/div/ul/li[1]/a]`
        ),
        (element) => parseInt(element.textContent)
      )
    );
mxcdh
  • 105
  • 5
  • 1
    What do you mean by "SelectorAll + xPath"? These are two different approaches and you can't combine the two into one or mix up calls. You have an xpath here, not a CSS selector, so you'll need an [appropriate call for it](https://stackoverflow.com/a/68216786/6243352), or use Puppeteer's `page.$x` rather than `page.evaluate`. – ggorlen Apr 27 '22 at 19:28

0 Answers0