title: Get line separated text from element with <br> tags from cypress
body: <p>I'm trying to get contact information through cypress and compare it with database. So I need to split the details and get Title, First Name, Last Name, Country... etc.</p>
  <p>But the text contain in a single div and it has been separated using <code>&lt;br&gt;</code> tag.</p>
  <p>Then I have tried to get the text as follows:</p>
  <pre><code>cy.xpath('element xpath').invoke('text').then((AddressLineText) =&gt; {
          cy.log(AddressLineText);
  });
  </code></pre>
  <p>Flowing is the invoked text and it has been connected the line texts without even a space. Due to that I'm unable to split by space or /n.</p>
  <p><a href="https://i.stack.imgur.com/N9znd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/N9znd.png" alt="Cypress Log for invoke text" /></a></p>
  <p>Bellow is the HTML structure:</p>
  <pre><code>&lt;div class=&quot;address&quot;&gt;
      Mr. Test User
      &lt;br&gt;
      Testing Services Ltd
      &lt;br&gt;
      Britannia House
      &lt;br&gt;
      Rushmills
      &lt;br&gt;
      NN4 7YB, Northampton
      &lt;br&gt;
      Northamptonshire
      &lt;br&gt;
      United Kingdom
  &lt;/div&gt;
  </code></pre>
  <p>How to isolate each lines according to this scenario.</p>