All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.serenitybdd.screenplay.matchers.WebElementStateMatchers Maven / Gradle / Ivy

There is a newer version: 4.2.8
Show newest version
package net.serenitybdd.screenplay.matchers;

import net.serenitybdd.core.pages.WebElementState;
import net.serenitybdd.screenplay.matchers.statematchers.*;
import org.hamcrest.Matcher;

public class WebElementStateMatchers {
    /**
     * Is this element present and visible on the screen
     */
    public static  Matcher isVisible() {
        return new IsVisibleMatcher();
    }

    /**
     * Is this element not visible on the screen
     */
    public static  Matcher isNotVisible() {
        return new IsNotVisibleMatcher();
    }

    public static  Matcher isNotEmpty() {
        return new IsNotEmptyMatcher();
    }

    public static  Matcher isEmpty() {
        return new IsEmptyMatcher();
    }

    public static  Matcher isCurrentlyVisible() {
        return new IsCurrentlyVisibleMatcher();
    }

    public static  Matcher isNotCurrentlyVisible() {
        return new IsNotCurrentlyVisibleMatcher();
    }

    public static  Matcher isEnabled() {
        return new IsEnabledMatcher();
    }

    public static  Matcher isNotEnabled() {
        return new IsNotEnabledMatcher();
    }

    public static  Matcher isCurrentlyEnabled() {
        return new IsCurrentlyEnabledMatcher();
    }

    public static  Matcher isNotCurrentlyEnabled() {
        return new IsNotCurrentlyEnabledMatcher();
    }

    public static  Matcher isPresent() {
        return new IsPresentMatcher();
    }

    public static  Matcher isNotPresent() {
        return new IsNotPresentMatcher();
    }

    public static  Matcher isSelected() {
        return new IsSelectedMatcher();
    }

    public static  Matcher isNotSelected() {
        return new IsNotSelectedMatcher();
    }

    public static  Matcher isClickable() {
        return new isClickableMatcher();
    }

    public static  Matcher containsText(String expectedText) {
        return new ContainsTextMatcher(expectedText);
    }

    public static  Matcher hasValue(String expectedText) {
        return new HasValueMatcher(expectedText);
    }

    public static  Matcher containsOnlyText(String expectedText) {
        return new ContainsOnlyTextMatcher(expectedText);
    }

    public static  Matcher containsSelectOption(String expectedText) {
        return new ContainsSelectOptionMatcher(expectedText);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy