title: how to trim extra spaces from an selected locator value and convert it to integer so assertion of greater than is performed over it in cypress?
body: <p>i have the grid which has html as follow</p>
  <blockquote>
  <pre><code>&lt;div class=&quot;grid-container&quot;&gt;
    &lt;div class=&quot;ui three column grid&quot;&gt;
            &lt;div class=&quot;row&quot;&gt;
                &lt;div class=&quot;fourteen wide column&quot;&gt;
                    &lt;h3&gt;Successfull&lt;/h3&gt;
                &lt;/div&gt;
          &lt;/div&gt;
      &lt;div class=&quot;row&quot;&gt;
        &lt;div class=&quot;column&quot;&gt;&lt;/div&gt;
        &lt;div class=&quot;column&quot;&gt;&lt;h5&gt;Before&lt;/h5&gt;&lt;/div&gt;
        &lt;div class=&quot;column&quot;&gt;&lt;h5&gt;After&lt;/h5&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class=&quot;row&quot;&gt;
          &lt;div class=&quot;column&quot;&gt;Status&lt;/div&gt;
          &lt;div class=&quot;column&quot;&gt;&lt;h5&gt;3&lt;/h5&gt;&lt;/div&gt;
          &lt;div class=&quot;column&quot;&gt;&lt;h5&gt;50&lt;/h5&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class=&quot;row&quot;&gt;
        &lt;div class=&quot;column&quot;&gt;Result&lt;/div&gt;
        &lt;div class=&quot;column&quot;&gt;&lt;h5&gt;loose&lt;/h5&gt;&lt;/div&gt;
        &lt;div class=&quot;column&quot;&gt;&lt;h5&gt;win&lt;/h5&gt;&lt;/div&gt;
      &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;
  </code></pre>
  </blockquote>
  <p>and look like this <a href="https://i.stack.imgur.com/Wcgch.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Wcgch.png" alt="enter image description here" /></a></p>
  <p>i am trying to get data for status before and after and wanted to make the</p>
  <blockquote>
  <p>assertion</p>
  </blockquote>
  <p>as</p>
  <pre><code>3 is greater than zero
  and 
  69 is greater than 65 
  </code></pre>
  <p>I <code>don't</code> want to use the <code>net-child()</code> in finding the locator as i am trying to perform it on <code>cypress syntax</code> only</p>
  <p>my effort</p>
  <p>but getting this error</p>
  <pre><code>cy.get(.three).contains('Status').parent().should('have.text',0);
  
  
  
   get  .three
      -contains status
      -parent
      -next
      -assert expected '&lt;div.column&gt;' to have text '0' but the text was ' 3 '
  </code></pre>
  <p>i.e. it is returning wide space before and after 3</p>
  <p>when i tried to convert it into an integer to cater my requirement</p>
  <pre><code>cy.get(&quot;.three&quot;).contains('Status').parent().invoke('val').then(parseFloat).should('be.gte',0);
  
   get  .three
      -contains status
      -parent
      -next
      -assert expected NaN to be at least 0
  </code></pre>
  <p>also is there any better way of traversing through the required locator?</p>