public void GetTextWithLineBreakForInlineElement() { driver.Url = simpleTestPage; IWebElement label = driver.FindElement(By.Id("label1")); string labelText = label.Text; Assert.IsTrue(new Regex("foo[\\n\\r]+bar").IsMatch(labelText)); }