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

net.serenitybdd.screenplay.questions.WebDriverQuestion Maven / Gradle / Ivy

There is a newer version: 4.2.8
Show newest version
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