title: Puppeteer - how to use page.evaluateHandle
body: <p>I have some trouble using the newest version of puppeteer.</p>
  
  <p>I'm using puppeteer version 0.13.0. </p>
  
  <p>I have a site with this element: </p>
  
  <pre><code>&lt;div class="header"&gt;hey there&lt;/div&gt;
  </code></pre>
  
  <p>I'm trying to run this code:</p>
  
  <pre><code>  const headerHandle = await page.evaluateHandle(() =&gt; {
      const element = document.getElementsByClassName('header');
      return element;
    });
  </code></pre>
  
  <p>Now the headerHandle is a JSHandle with a description: 'HTMLCollection(0)'.</p>
  
  <p>If I try to run 
  <code>headerHandle.getProperties()</code> and try to console.log I get <code>Promise { &lt;pending&gt; }</code>.</p>
  
  <p>If I just try to get the element like this:</p>
  
  <pre><code>  const result = await page.evaluate(() =&gt; {
      const element = document.getElementsByClassName('header');
      return Promise.resolve(element);
    });
  </code></pre>
  
  <p>I get an empty object.</p>
  
  <p>How do I get the actual element or the value of the element?</p>