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

net.serenitybdd.screenplay.actions.DriverTask 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.Performable;
import net.serenitybdd.screenplay.abilities.BrowseTheWeb;
import org.openqa.selenium.WebDriver;

import java.util.function.Consumer;

public class DriverTask implements Performable {
    private final Consumer action;

    public DriverTask(Consumer action) {
        this.action = action;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy