net.serenitybdd.screenplay.questions.WebDriverQuestion Maven / Gradle / Ivy
package net.serenitybdd.screenplay.questions;
import net.serenitybdd.screenplay.Question;
import net.serenitybdd.screenplay.abilities.BrowseTheWeb;
import java.util.function.Function;
public class WebDriverQuestion {
public static UIInteractionQuestionBuilder about(String subject) {
return new UIInteractionQuestionBuilder(subject);
}
public static class UIInteractionQuestionBuilder {
private final String subject;
UIInteractionQuestionBuilder(String subject) {
this.subject = subject;
}
public Question answeredBy(Function questionToAsk) {
Question uiInteractionQuestion = actor -> questionToAsk.apply(BrowseTheWeb.as(actor));
return new QuestionWithDefinedSubject(uiInteractionQuestion, subject);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy