I use Nokogiri for parse the html page with same content:
<p class="parent">
Useful text
<br>
<span class="child">Useless text</span>
</p>
When I call the method page.css('p.parent').text
Nokogiri returns 'Useful text Useless text'. But I need only 'Useful text'.
How to get node text without children?