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

net.serenitybdd.screenplay.actions.UploadToWebElement 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.annotations.Step;
import org.openqa.selenium.WebElement;

import java.nio.file.Path;

public class UploadToWebElement extends UploadToField {

    private final WebElement uploadField;

    public UploadToWebElement(Path inputFile, WebElement uploadField) {
        super(inputFile);
        this.uploadField = uploadField;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy