title: Puppeteer click random
body: <p>I'm using puppeteer and I Have only two click like:</p>
  <pre><code>await page.click('span[data-href=&quot;' + XXX + '&quot;]');
  var [button] = await page.$x(&quot;//span[contains(., 'Upload Picture')]&quot;);
  await button.click();
  </code></pre>
  <p>I'm using <code>headless:true</code>, and I can see that sometimes the automation click on the other button or dropdown.</p>
  <p>It's a problem because the click can open a modal or sometimes open a new tab and my flow is stopped.</p>