There is a form with user authorization fields: 
I would like to test it with the help of Selenium. I came across such an example on the web (below is the code fragment):
@Test public void inValid_UserCredential() { System.out.println("Starting test " + new Object(){}.getClass().getEnclosingMethod().getName()); driver.get("http://192.168.35.10/"); driver.findElement(By.xpath(".//*[@id='account']/a")).click(); driver.findElement(By.id("E-Mail")).sendKeys("testuser"); driver.findElement(By.id("Passwort")).sendKeys("Test@123"); driver.findElement(By.id("login")).click(); try{ element = driver.findElement (By.xpath(".//*[@id='account_logout']/a")); }catch (Exception e){ } Assert.assertNotNull(element); System.out.println("Ending test " + new Object(){}.getClass().getEnclosingMethod().getName()); } As I understand it, this fragment enters incorrect data into the fields and clicks. However, the question is as follows. The test does not work as it should for fields of the type I showed in the screenshot and I think that here is By.id("E-Mail") error. It is necessary that he somtrel not by id, but by some other parameter (to find these fields and enter in them what is shown in parentheses). Do I understand this correctly and if so, what should I change to correct this error?