title: How to use .$$eval function
body: <p>I'm trying to run this code:</p>
  <pre class="lang-js prettyprint-override"><code>var aaa = await page.$$eval(
    selector,
    list =&gt; (list, value) =&gt; {
      return resolve(list.find(element =&gt; element.textContent === value));
    },
    value
  );
  </code></pre>
  <p>But I received an error.</p>
  <p>Therefore, I tried to print the items in &quot;list&quot; (because I assumed that the problem is there), I tried this code:</p>
  <pre class="lang-js prettyprint-override"><code>var aaa = await page.$$eval(selector, list =&gt; list);
  </code></pre>
  <p>And I received that &quot;aaa&quot; is empty.</p>
  <p>Any idea what may be the problem?</p>