io.magentys.cinnamon.webdriver.conditions.Conditions Maven / Gradle / Ivy
package io.magentys.cinnamon.webdriver.conditions;
import io.magentys.cinnamon.webdriver.ReadyState;
import org.openqa.selenium.WebDriver;
public final class Conditions {
// Suppresses default constructor, ensuring non-instantiability.
private Conditions() {
}
public static Condition not(final Condition condition) {
return new NotCondition<>(condition);
}
public static Condition ajaxFinished = new AjaxFinishedCondition();
public static Condition readyState(final ReadyState readyState) {
return new DocumentReadyStateCondition(readyState);
}
@SafeVarargs
public static Condition allOf(Condition... conditions) {
return new AndCondition<>(conditions);
}
@SafeVarargs
public static Condition anyOf(Condition... conditions) {
return new OrCondition<>(conditions);
}
}