title: How do I click on a link that is associated to a another DIV with Cypress.io?
body: <p>I'm having a problem locating an item  to click that is related to a specific "row" in a div using the .click() function in Cypress.io.  Below is my example div table:</p>
  
  <pre><code>&lt;div class="table"&gt; 
    &lt;div class="col-sm-10"&gt;Item 1&lt;/div&gt;
    &lt;div class="col-sm-2 action"&gt;
      &lt;a href="#"&gt;&lt;i class="fa-times-circle-o"&gt;&lt;/i&gt;&lt;/a&gt;
    &lt;/div&gt;
  
    &lt;div class="col-sm-10"&gt;Item 2&lt;/div&gt;
    &lt;div class="col-sm-2 action"&gt;
      &lt;a href="#"&gt;&lt;i class="fa-times-circle-o"&gt;&lt;/i&gt;&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>What I want to do is click on the A link for a specified row.  For example, I want to click on the A link for the "row" that contains the text of Item 2.  I need to do this dynamically because the order of the items, as well as the names of the items,  may change depending upon data.</p>
  
  <p>I'm trying something like this:</p>
  
  <pre><code>cy.get('div:contains("Item 2")').click()
  </code></pre>
  
  <p>But the div is not the clickable one, it is the following A in the code.  Any ideas?</p>