Skip to content

Commit d28fa64

Browse files
committed
Adding tests for #3384
1 parent 4b6ca97 commit d28fa64

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

java/client/test/org/openqa/selenium/TextHandlingTest.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
import static org.junit.Assert.assertTrue;
3131
import static org.junit.Assume.assumeFalse;
3232
import static org.openqa.selenium.testing.Driver.ALL;
33-
import static org.openqa.selenium.testing.Driver.HTMLUNIT;
3433
import static org.openqa.selenium.testing.Driver.IE;
3534
import static org.openqa.selenium.testing.Driver.MARIONETTE;
3635

3736
import org.hamcrest.Description;
3837
import org.hamcrest.Matcher;
3938
import org.hamcrest.TypeSafeMatcher;
4039
import org.junit.Test;
40+
import org.openqa.selenium.environment.webserver.Page;
4141
import org.openqa.selenium.testing.Ignore;
4242
import org.openqa.selenium.testing.JUnit4TestBase;
4343
import org.openqa.selenium.testing.JavascriptEnabled;
@@ -412,4 +412,16 @@ public void testShouldTrimTextWithMultiByteWhitespaces() {
412412
assertEquals("test", text);
413413
}
414414

415+
@Test
416+
public void canHandleTextThatLooksLikeANumber() {
417+
driver.get(appServer.create(new Page()
418+
.withBody("<div id='point'>12.345</div>",
419+
"<div id='comma'>12,345</div>",
420+
"<div id='space'>12 345</div>")));
421+
422+
assertThat(driver.findElement(By.id("point")).getText(), is("12.345"));
423+
assertThat(driver.findElement(By.id("comma")).getText(), is("12,345"));
424+
assertThat(driver.findElement(By.id("space")).getText(), is("12 345"));
425+
}
426+
415427
}

0 commit comments

Comments
 (0)