com.epam.jdi.light.ui.html.asserts.CheckboxAssert Maven / Gradle / Ivy
package com.epam.jdi.light.ui.html.asserts;
import com.epam.jdi.light.asserts.generic.SelectedAssert;
import com.epam.jdi.light.asserts.generic.UIAssert;
import com.epam.jdi.light.common.JDIAction;
import com.epam.jdi.light.ui.html.elements.common.Checkbox;
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 CheckboxAssert extends UIAssert
implements SelectedAssert {
@JDIAction("Assert that '{name}' is selected")
public CheckboxAssert selected() {
jdiAssert(getIsSelected(), Matchers.is("selected"));
return this;
}
@JDIAction("Assert that '{name}' is not selected")
public CheckboxAssert deselected() {
jdiAssert(getIsSelected(), Matchers.is("not selected"));
return this;
}
//protected
protected String getIsSelected() {
return element().isSelected() ? "selected" : "not selected";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy