title: Customized selenium Output
body: <p>Am working on selenium Automation</p>
  
  <p>I want to know the name of which  elements is not found when test cases got failed instead of getting object not found with property By.id("Login")</p>
  
  <p>am expecting output like Object not found LoginButton(Customized name which i will give in code) when test cases fails due to defect</p>
  
  <pre><code>public static void logonCustomerPortal() throws Exception{
      Thread.sleep(5000);
      driver.findElement(By.xpath("//a[@id='nav_login']/span")).click();
      Thread.sleep(2000);
  }
  </code></pre>
  
  <p>I am new to Automation. Can anyone please help me ?</p>