net.serenitybdd.screenplay.questions.targets.TheTarget Maven / Gradle / Ivy
package net.serenitybdd.screenplay.questions.targets;
import net.serenitybdd.screenplay.Question;
import net.serenitybdd.screenplay.targets.Target;
import java.util.Collection;
import java.util.List;
public class TheTarget {
public static Question valueOf(Target target) {
return new TargetValue(target);
}
public static Question> valuesOf(Target target) {
return new TargetValues(target);
}
public static TargetText textOf(Target target) {
return new TargetText(target);
}
public static TargetTextValues textValuesOf(Target target) {
return new TargetTextValues(target);
}
public static Question selectedValueOf(Target target) {
return new TargetSelectedValue(target);
}
public static Question selectedVisibleTextValueOf(Target target) {
return new TargetSelectedVisibleText(target);
}
public static Question> selectOptionsOf(Target target) {
return new TargetSelectOptions(target);
}
public static TargetAttributeBuilder attributeNamed(String name) {
return new TargetAttributeBuilder(name);
}
public static TargetCSSBuilder cssValueNamed(String name) {
return new TargetCSSBuilder(name);
}
public static class TargetAttributeBuilder {
private final String name;
public TargetAttributeBuilder(String name) {
this.name = name;
}
public Question forTarget(Target target) {
return new TargetAttribute(target, name);
}
public Question> forTargetsMatching(Target target) {
return new TargetAttributes(target, name);
}
}
public static class TargetCSSBuilder {
private final String name;
public TargetCSSBuilder(String name) {
this.name = name;
}
public Question forTarget(Target target) {
return new TargetCSSValue(target, name);
}
public Question> forTargetsMatching(Target target) {
return new TargetCSSValues(target, name);
}
}
}