Relative Content

Tag Archive for javagoogle-chromeselenium-webdriversafari

Is there a way to remove a linebreak from the textToBePresentInElement waiter?

When using the innerText JS method Chrome and Safari return the text in different formats if there are multiple child elements with text.
We’ve been using Safari for our tests and when calling getText() or textToBePresentInElement(String) it will return a normal linebreak which is then ignored when using the waiter. But in Chrome, the linebreak is a n which is not part of the original string, failing the check.
Chrome: