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

net.serenitybdd.screenplay.actions.UploadToTarget Maven / Gradle / Ivy

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

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

import java.nio.file.Path;

public class UploadToTarget extends UploadToField {

    private final Target uploadField;

    public UploadToTarget(Path inputFile, Target uploadField) {
        super(inputFile);
        this.uploadField = uploadField;
    }

    @Override
    @Step("Upload file at #inputFile to #uploadField")
    public  void performAs(T actor) {
        uploadFile(actor).to(uploadField.resolveFor(actor));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy