Development

Balance is a slightly different time management tool. It requires you to manually clock on and off and urges you…

I am trying to use this xpath to find the number of elements that have a value between X and Y. The problem I am facing is since there is &nbsp in the HTML, and the code doesn’t detect the text value.
Xpath:
//div[@class=”prix”]/div[2]/div[2]/span[1][number(translate(text(), “,”, “.”)) > 4 and number(translate(text(), “,”, “.”)) < 43]

HTML :
<div class=”d-flex-inline productPrice”>
<span>4,42&nbsp;</span>
<span>€/HT</span>
</div>

I tried with replace(text(),” “,””) and replace(text(),”&nbsp;”,””) and other combinations but nothing worked.