com.epam.jdi.light.asserts.generic.TextAssert Maven / Gradle / Ivy
package com.epam.jdi.light.asserts.generic;
import com.epam.jdi.light.common.JDIAction;
import com.epam.jdi.light.elements.interfaces.common.IsText;
import org.hamcrest.Matcher;
import static com.epam.jdi.light.asserts.core.SoftAssert.jdiAssert;
import static org.hamcrest.Matchers.is;
/**
* Created by Roman Iovlev on 14.02.2018
* Email: [email protected]; Skype: roman.iovlev
*/
public class TextAssert extends UIAssert
implements ITextAssert {
@JDIAction("Assert that '{name}' text {0}")
public TextAssert text(Matcher condition) {
jdiAssert(element.getText(), condition);
return this;
}
public TextAssert text(String text) { return text(is(text)); }
}