@Test public void shouldMatchConditionWhenElementIsDisplayed() { when(mockElement.isDisplayed()).thenReturn(true); DisplayedCondition condition = new DisplayedCondition(); assertThat(condition.apply(mockElement), equalTo(true)); }
@Override public boolean apply(final WebElement element) { try { return element.isDisplayed(); } catch (NullPointerException | WebDriverException e) { return false; } }
DisplayedCondition extends Condition<WebElement> { @Override public boolean apply(final WebElement element) { try { return element.isDisplayed(); } catch (NullPointerException | WebDriverException e) { return false; } } }
DisplayedCondition extends Condition<WebElement> { @Override public boolean apply(final WebElement element) { try { return element.isDisplayed(); } catch (NullPointerException | WebDriverException e) { return false; } }  }
DisplayedCondition extends Condition<WebElement> { @Override public boolean apply(final WebElement element) { try { return element.isDisplayed(); } catch (NullPointerException | WebDriverException e) { return false; } }  @Override boolean apply(final WebElement element); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); }
DisplayedCondition extends Condition<WebElement> { @Override public boolean apply(final WebElement element) { try { return element.isDisplayed(); } catch (NullPointerException | WebDriverException e) { return false; } }  @Override boolean apply(final WebElement element); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }