title: How to click on a link that has a certain content in puppeteer?
body: <p>If I have some content in my page such as:</p>
  
  <pre><code>&lt;a&gt;Hi!&lt;/a&gt;
  </code></pre>
  
  <p>How can I use Google's Puppeteer to automate the clicking of that element?</p>
  
  <p>I need to be able to select it based on its contents alone, not id, class or attribute.</p>
  
  <p>Is there something like <code>$('a:contains("Hi!")')</code> that I can leverage to select this element?</p>
  
  <p>How can I do this with <a href="https://github.com/GoogleChrome/puppeteer" rel="noreferrer">https://github.com/GoogleChrome/puppeteer</a></p>
  
  <p>thanks</p>