Capybara 3 & Poltergeist normalize consecutive whitespaces

98 Views Asked by At

I've updated Capybara to version 3.29.0 (with Poltergeist 1.18.1), and the whitespaces are not normalized like in version 2, meaning the \n characters appear in page.text, which is what I expected. However, if I have consecutive newlines, like <br><br>, it will be collapsed to only one \n. Is there any way I can stop that collapsing behavior?
By the way, if I add Capybara.default_normalize_ws = true, all <br> will be normalized to standard spaces like in Capybara 2, which is not what I want.

0

There are 0 best solutions below