Enter your email address:
I want to print fields validation message on console
WebDriver driver = new ChromeDriver();
WebELement field = driver.findElement(By.id(“id”));
system.out.println(field + ” ” + “is mendatory”); // you can write your own message here
You can use log4j console appender . search google for this.