I want to get an element by ID with selenium in JAVA. The ID of the element in question so happens to have a period in it id="myprojectId0.123456789" when I try to find the element like so
WebElement projId = driver.findElement(By.id("mprojectId0.10724909303153396"));
I get this error in the console:
Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to locate element: #mprojectId0\.10724909303153396
For some reason the . character within the value of the ID attribute is being converted to \. and hence it cannot find the element. Please help and thanks in advance!