net.serenitybdd.screenplay.actions.DriverTask Maven / Gradle / Ivy
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