title: access the output of get in then block
body: <p>how to access the element that is yielded from .get().contains() in .then() function </p>
  
  <p>My code is not entering the Then block. where am i doing wrong ?</p>
  
  <pre><code>cy.get(".c-header-listItem").contains("My Account").should(($link) =&gt; {
          expect(localStorage.read("CD-SessionId")).to.be.not.null;`enter code here`
      }).then(($link) =&gt; {
          $link.click();
      });
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/gNo3u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gNo3u.png" alt="Cypess UI"></a></p>
  
  <p>I got the login from Cypress documentation <a href="https://docs.cypress.io/api/commands/should.html#Subjects" rel="nofollow noreferrer">https://docs.cypress.io/api/commands/should.html#Subjects</a></p>