title: Cypress: is using within() better to find a child?
body: <p>Cypress has the option to use within() to scope all subsequent cy commands to within that element.</p>
  <p>In the case where i want to find a descendant, is it any better to use within() or these other two formats? I understand &gt; is direct descendant while the space is the same with within() where it checks all descendants. The reason i had had to use both tags in my get() is because the tagB is used several times in the page, so i had to use tagA that makes it unique.</p>
  <p>Code:</p>
  <pre><code>&lt;div class=&quot;ClassA&quot; data-qa=&quot;tagA&quot;&gt;
     &lt;button class=&quot;ClassB&quot; data-qa=&quot;tagB&quot;/&gt;
  &lt;/div&gt;
  </code></pre>
  <p><strong>Which is better?</strong></p>
  <p><code>cy.get('[data-qa=&quot;tagA&quot;] [data-qa=&quot;tagB&quot;]').click()</code></p>
  <p><code>cy.get('[data-qa=&quot;tagA&quot;] &gt; [data-qa=&quot;tagB&quot;]').click()</code></p>
  <pre><code>cy.get('[data-qa=&quot;tagA&quot;]').within(() =&gt; {
    cy.get('[data-qa=&quot;tagB&quot;]').click()
  })
  </code></pre>