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

net.serenitybdd.screenplay.actions.selectactions.SelectByValueFromTarget Maven / Gradle / Ivy

There is a newer version: 4.2.8
Show newest version
package net.serenitybdd.screenplay.actions.selectactions;

import net.serenitybdd.screenplay.Actor;
import net.serenitybdd.screenplay.Performable;
import net.serenitybdd.screenplay.targets.Target;
import net.serenitybdd.annotations.Step;

public class SelectByValueFromTarget implements Performable {
    private Target target;
    private String[] values;

    public SelectByValueFromTarget() {}

    public SelectByValueFromTarget(Target target, String... values) {
        this.target = target;
        this.values = values;
    }

    @Step("{0} selects #values in #target")
    public  void performAs(T theUser) {
        for(String value : values) {
            target.resolveFor(theUser).selectByValue(value);
        }
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy