title: Puppeteer js element can be found only when developer tools is open
body: <p>I am trying to scrape the Instagram website using puppeteer and something very strange is happening. As I try clicking on the "followers" button of any given username with the following code:</p>
  
  <pre><code>await page.$eval('#react-root &gt; section &gt; main &gt; div &gt; ul &gt; li:nth-child(2) &gt; a &gt; span', elem =&gt; elem.click());
  </code></pre>
  
  <p>I get prompted that there isn't any element with that selector. </p>
  
  <p><a href="https://i.stack.imgur.com/Qf7ls.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qf7ls.png" alt="enter image description here"></a></p>
  
  <p>Nevertheless, if I quickly activate the developer tools on the chrome page before the code is supposed to click on the button, the action works:
  <a href="https://i.stack.imgur.com/bF1B4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bF1B4.png" alt="enter image description here"></a></p>
  
  <p>I would really like to know why this happens and how to get the button without having to open developer tools. Thanks. </p>