title: Check visibility in viewport (puppeteer)
body: <p>How can I check with Puppeteer whether an HTML element is visible within the viewport (the visible area) or not? For example if I have to scroll to be able to see a button, then it's not visible.</p>
  
  <pre><code>page.waitForSelector('#element', { visible: true })
  </code></pre>
  
  <p>The page.waitForSelector function is not what I'm looking for, because it only checks if the element is in the DOM and is not hidden with CSS properties.</p>
  
  <p>Is there any method to check an element's visibility in the viewport?</p>