net.serenitybdd.screenplay.matchers.statematchers.IsNotCurrentlyEnabledMatcher Maven / Gradle / Ivy
package net.serenitybdd.screenplay.matchers.statematchers;
import net.serenitybdd.core.pages.WebElementState;
import org.hamcrest.Description;
public class IsNotCurrentlyEnabledMatcher extends BaseWebElementStateMatcher {
@Override
protected boolean matchesSafely(T element) {
return !super.existing(element).isCurrentlyEnabled();
}
@Override
public void describeTo(Description description) {
description.appendText("an element that is not currently enabled");
}
@Override
protected void describeMismatchSafely(T item, Description mismatchDescription) {
mismatchDescription.appendText(WebElementStateDescription.forElement(item)).appendText(" was enabled");
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy