net.serenitybdd.screenplay.questions.TargetedUIState Maven / Gradle / Ivy
package net.serenitybdd.screenplay.questions;
import net.serenitybdd.core.pages.WebElementFacade;
import net.serenitybdd.screenplay.Actor;
import net.serenitybdd.screenplay.targets.Target;
import java.util.List;
import java.util.stream.Stream;
public abstract class TargetedUIState extends UIState{
protected final Target target;
protected TargetedUIState(Target target, Actor actor) {
super(actor);
this.target = target;
}
public abstract List resolveAll();
public List asList() {
return resolveAll();
}
public List asListOf(Class type) {
return super.convertToEnums(type, asList());
}
protected Stream resolvedElements() {
return target.resolveAllFor(actor).stream();
}
}