All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.serenitybdd.screenplay.questions.TargetedUIState Maven / Gradle / Ivy

There is a newer version: 4.2.8
Show newest version
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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy