try{
boolean k= driver.findElement(By.xpath(" ")).isDisplayed();
if(!k==true)
{
System.out.println("true12");
}
}
else {
System.out.println("false12");
}
}catch (NoSuchElementException e) {
System.out.println(e);
}
i want to check negative condition.
above boolean element is not displayed ,but i have to print true and false but it shows no such element exception
please help.