to check element present code example
Example: to check element present
if(driver.findElement(By.xpath("value"))!= null)
{ System.out.println("Element is Present");
}else{ System.out.println("Element is Absent"); }
if(driver.findElement(By.xpath("value"))!= null)
{ System.out.println("Element is Present");
}else{ System.out.println("Element is Absent"); }