title: Puppeteer page.click doesn't work in headless mode
body: <h3>What's the problem</h3>
  <p>I try to click some element using Puppeteer, and I tried both <code>page.click</code> and <code>page.evaluate</code> on this task.</p>
  <ul>
  <li>If in <code>headless=false</code> mode, both approaches work well.</li>
  <li>If in <code>headless=true</code> mode, <code>page.evaluate</code> works, but <code>page.click</code> <em>hangs forever</em>.</li>
  </ul>
  <p>What I did then, is <code>page.waitForSelector</code> explicitly for the element before <code>page.click</code>, see code below.</p>
  <p>And looks like <code>waitForSelector</code> hangs forever too.</p>
  <p>Could anyone help me to understand why it hangs in headless mode?</p>
  <h3>Env</h3>
  <pre><code>chrome version is HeadlessChrome/80.0.3987.0
  puppeteer version 2.1
  macOS catalina 10.15.3
  </code></pre>
  <h3>Code</h3>
  <pre><code>
  const pptr = require('puppeteer');
  
  console.log(pptr.version);
  
  (async () =&gt; {
      var br = await pptr.launch({
          headless: true,
          defaultViewport: null,
          args: [
              '--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36',
              '--user-data-dir=/tmp/user_data/',
          ],
      });
      var page = await br.newPage();
      var url = 'https://www.lookfantastic.com/brands/aesop/view-all.list';
      var css = 'div.responsiveProductListPage_topPagination button[aria-label=&quot;next page&quot; i]:not([disabled])';
  
      const chrome_version = await page.browser().version();
      console.log(`chrome version is ${chrome_version}`);
  
      await page.goto(url);
      await page.waitForSelector(css, { visible: true });  // when headless=true, hangs here.
  
      await Promise.all([
          page.click(css),
          //page.evaluate((css) =&gt; { document.querySelector(css).click(); }, css),
          page.waitForNavigation({waitUntil: 'networkidle0'}),
      ]);
      console.log('success');
      await new Promise(r =&gt; setTimeout(r, 1000));
      await br.close();
  })();
  
  </code></pre>