net.serenitybdd.screenplay.actions.WithDevTools Maven / Gradle / Ivy
package net.serenitybdd.screenplay.actions;
import net.serenitybdd.markers.CanBeSilent;
import net.serenitybdd.screenplay.Actor;
import net.serenitybdd.screenplay.Performable;
import net.serenitybdd.screenplay.Question;
import net.serenitybdd.screenplay.abilities.BrowseTheWeb;
import org.openqa.selenium.devtools.DevTools;
import java.util.function.Consumer;
import java.util.function.Function;
/**
* Perform an action directly using the DevTools API
* For example:
*
*
* actor.attemptsTo(
* WithDevTools.perform(
* devTools -> devTools.createSession()
* )
* );
*
*
*/
public class WithDevTools implements Performable, CanBeSilent {
private final Consumer action;
private boolean isSilent = false;
public WithDevTools(Consumer action) {
this.action = action;
}
public static WithDevTools perform(Consumer action) {
return new WithDevTools(action);
}
public static Question
© 2015 - 2024 Weber Informatics LLC | Privacy Policy