In some cases, i know element will not be displayed. but its waiting ~30 Secs.
How to decrease wait time for NoSuchElementException
in selenium?
Sample code:
String name;
try {
name = driver.findElement(By.xpath("XPath")).getText();
} catch (NoSuchElementException e) {
name = "Name not displayed";
}