For a regular HTML
<b>WordA WordB WordC</b>
I'd use this XPath to retrieve this element.
//b[text()='WordA WordB WordC']
But I'm having the below HTML
<b>WordA WordB WordC</b>
When I'm trying to retrieve the element in this instance, the first XPath returns nothing.
//b[text()='WordA\u00a0WordB\u00a0WordC']
Above one works.
But instead of using the '\u00a0' part, is there a better way to handle this situation. Some defined function to normalize the spaces.
etc:
//b[someFunction()='WordA WordB WordC']