Simon
> --
> You received this message because you are subscribed to the Google Groups "webdriver" group.
> To post to this group, send email to webd...@googlegroups.com.
> To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.
>
>
public ExpectedCondition<Boolean> not(
final ExpectedCondition<?> toInvert) {
return new ExpectedCondition<Boolean>() {
public Boolean apply(WebDriver driver) {
try {
Object result = toInvert.apply(driver);
return (result == null || result == Boolean.FALSE);
} catch (Exception e) {
// You may want to tweak this bit
return true;
}
}
};
}
Simon