I don't understand very well the purpose of normalize-space()
.
I think it's very useful. In fact, I always use it when I am doing tests, but I am not sure the principal purpose.
For example, in these two cases, what are the differences? What is the advantage of using it?
Example 1
WebElement seleccionLabelCabecera
= findBy(xpath("(//div[contains(normalize-space(@class),
'windowViewMode-maximized active')"]
Example 2
WebElement seleccionLabelCabecera
= findBy(xpath("(//div[@class, 'windowViewMode-maximized active')"]