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

net.serenitybdd.screenplay.actions.PerformActions 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.abilities.BrowseTheWeb;
import net.serenitybdd.screenplay.conditions.SilentPerformable;
import org.openqa.selenium.interactions.Actions;

import java.util.function.Consumer;

public class PerformActions extends SilentPerformable {
    private Consumer actions;

    private PerformActions(Consumer actions) {
        this.actions = actions;
    }

    public static PerformActions with(Consumer actions) {
        return new PerformActions(actions);
    }

    @Override
    public  void performAs(T actor) {
        actions.accept(BrowseTheWeb.as(actor).withAction());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy