How Can I Print field Validation message on console?

I want to print fields validation message on console

Default Asked on September 10, 2015 in Selenium WebDriver.
Add Comment
  • 2 Answer(s)

    WebDriver driver = new ChromeDriver();;
    WebELement field = driver.findElement(“id”));
    system.out.println(field + ” ” + “is mendatory”);    // you can write your own message here

    Train Answered on September 30, 2015.
    Add Comment

    You can use log4j console appender . search google for this.

    Supporter Answered on October 9, 2015.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.