Is it possible to just get a single element with puppeteer and not an array? I keep seeing:
const elements = await page.$$('.some-class');
Is it possible just to get one element without an array?
Is it possible to just get a single element with puppeteer and not an array? I keep seeing:
const elements = await page.$$('.some-class');
Is it possible just to get one element without an array?
Copyright © 2021 Jogjafile Inc.
page.$
maps todocument.querySelector
andpage.$$
maps todocument.querySelectorAll
. If you want to get only one element you can usepage.$
: