com.epam.jdi.light.ui.html.asserts.LinkAssert Maven / Gradle / Ivy
package com.epam.jdi.light.ui.html.asserts;
import com.epam.jdi.light.asserts.generic.ITextAssert;
import com.epam.jdi.light.asserts.generic.UIAssert;
import com.epam.jdi.light.common.JDIAction;
import com.epam.jdi.light.ui.html.elements.common.Link;
import org.hamcrest.Matcher;
import org.hamcrest.Matchers;
import static com.epam.jdi.light.asserts.core.SoftAssert.jdiAssert;
/**
* Created by Roman Iovlev on 14.02.2018
* Email: [email protected]; Skype: roman.iovlev
*/
public class LinkAssert extends UIAssert
implements ITextAssert {
@JDIAction("Assert that '{name}' text {0}")
public LinkAssert text(Matcher condition) {
jdiAssert(element().getText(), condition);
return this;
}
@JDIAction("Assert that '{name}' alt {0}")
public LinkAssert alt(Matcher condition) {
jdiAssert(element().alt(), condition);
return this;
}
public LinkAssert alt(String alt) { return alt(Matchers.is(alt)); }
@JDIAction("Assert that '{name}' ref {0}")
public LinkAssert ref(Matcher condition) {
jdiAssert(element().ref(), condition);
return this;
}
public LinkAssert ref(String ref) { return ref(Matchers.is(ref)); }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy