title: How to click link in Cypress?
body: <p>I want to click on below link in a page with several other links like this one.
  I have tried cy.get() with a number of alternative ways. I also tried cy.contains('Content 6') but received an error.</p>
  <pre><code>&lt;div class=&quot;column&quot;&gt;
      &lt;a href=&quot;/admin/contents/109&quot;&gt;
          &lt;div class=&quot;ui segment&quot;&gt;
              &lt;div class=&quot;ui center aligned header&quot;&gt;
                  Content 6
                  &lt;div class=&quot;sub header&quot;&gt;Add description to content packages
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  <p>This was my final solution:</p>
  <pre><code>cy.get('a[href*=&quot;admin/contents&quot;]').contains('Content 6').click()
  </code></pre>
  <p>I found the solution on this page and with help from user called Udo: <a href="https://docs.cypress.io/faq/questions/using-cypress-faq.html#How-do-I-get-an-element%E2%80%99s-text-contents" rel="noreferrer">https://docs.cypress.io/faq/questions/using-cypress-faq.html#How-do-I-get-an-element’s-text-contents</a></p>
  <p>The href code gives more example on how to handle this problem then other examples for same problem.</p>