Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View selenium-in-action's full-sized avatar

Selenium in Action selenium-in-action

View GitHub Profile
@selenium-in-action
selenium-in-action / DisplayUtil.java
Last active May 28, 2017 20:37
Check if element is displayed (and catching NoSuchElementException)
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebDriver;
public class DisplayUtil {
/**
* If exception occurs the element can't be visible
*
*/
public static boolean isDisplayed(final WebDriver driver, final By by) {