title: How to find elements in puppeteer?
body: <p>I'm having trouble finding the exact element 'closeIcon' Please take a look if you have time and let me know what you think.</p>
  <pre><code>
  const PAGEURL = &quot;https://www.shoepalace.com/&quot;;
  
  try {
      
  (async () =&gt; {
  
  
      
      const browser = await puppeteer.launch({headless: false});
  
      const page = await browser.newPage();  
  
      await page.goto(PAGEURL);
      
      page.waitForNavigation();
      
      const cancel = await page.waitForSelector('#cancelicon', {timeout: 60000});
  
      
      cancel.click();
      
      
      
  })();
      
  } catch (err){
      console.error(err);
  
  }
  
  
  function sleep(seconds) 
  {
    var e = new Date().getTime() + (seconds * 1000);
    while (new Date().getTime() &lt;= e) {}
  }
  
  </code></pre>
  <p>Here is a ss of the page elements:</p>
  <p><a href="https://gyazo.com/f3ba9895dfb79f224119acfbdc7901bb" rel="nofollow noreferrer">https://gyazo.com/f3ba9895dfb79f224119acfbdc7901bb</a></p>
  <p>Here is the error in console:</p>
  <p><a href="https://gyazo.com/9a15f0e86f1c253182da89358f3de4b0" rel="nofollow noreferrer">https://gyazo.com/9a15f0e86f1c253182da89358f3de4b0</a></p>