Accurately Targeting Elements with Puppeteer

How can I combine multiple CSS selectors into one mapping in Puppeteer? For example, extract image, title, and link from ‘.card-container’ elements:

const results = Array.from(document.querySelectorAll('.card-container')).map(item => {
  return {
    titleText: item.querySelector('.caption').innerText,
    imageURL: item.querySelector('img').src,
    hrefLink: item.querySelector('a').href
  };
});

hey, you might try using coma seperated selectors like ‘.caption, img, a’ but you’ll need to deal with the order manually. i usually stick with the individual selectors for clarity. hope that helps!