title: Puppeteer - Handlin page.waitForSelector() fails
body: <p>If <code>page.waitForSelector()</code> fails, it throws an error. Since this is run inside an async function if leads straight to the catch portion of the code.</p>
  
  <p>Is there a chance that if <code>page.waitForSelector()</code> fails, code is executed one line below?</p>
  
  <p>Like this (pseudocode):</p>
  
  <pre><code>if ( (await page.waitForSelector('.test') == null) { //do X}
  </code></pre>
  
  <p>From the API: </p>
  
  <blockquote>
    <p>If the selector doesn't appear after the timeout milliseconds of waiting, the function will throw.</p>
  </blockquote>
  
  <p>How do i manage that throw in the same block of code, as if the fucntion would succeed?</p>