@Override public UiElement check(DroidDriver driver, Finder finder) throws UnsatisfiedConditionException { try { return driver.find(finder); } catch (ElementNotFoundException e) { throw new UnsatisfiedConditionException(); } }
@Override public Void check(DroidDriver driver, Finder finder) throws UnsatisfiedConditionException { try { // "find" does not call refreshUiElementTree, while "has" calls driver.find(finder); throw new UnsatisfiedConditionException(); } catch (ElementNotFoundException enfe) { return null; } }