![JAR search and dependency download from the Maven repository](/logo.png)
com.redhat.darcy.ui.matchers.ElementText Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of darcy-ui Show documentation
Show all versions of darcy-ui Show documentation
Framework for writing page objects to automate interaction with graphical user interfaces.
The newest version!
package com.redhat.darcy.ui.matchers;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
import com.redhat.darcy.ui.api.elements.Text;
public class ElementText extends TypeSafeMatcher {
private final Matcher super String> matcher;
public ElementText(Matcher super String> matcher) {
this.matcher = matcher;
}
@Override
public void describeTo(Description description) {
description.appendText("an Element whose text is");
matcher.describeTo(description);
}
@Override
protected boolean matchesSafely(T element) {
return element.isPresent() && matcher.matches(element.getText());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy