net.serenitybdd.screenplay.actions.Open Java Examples

The following examples show how to use net.serenitybdd.screenplay.actions.Open. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Start.java    From base_project_for_web_automation_projects with MIT License 6 votes vote down vote up
@Override
@Step("{0} performs an authentication")
public <T extends Actor> void performAs(T theActor) {
    theActor.attemptsTo(Open.browserOn(gitHubLoginPage));

    theActor.should(seeThat(the(USERNAME_OR_EMAIL_ADDRESS), isVisible())
            .orComplainWith(StartError.class,
                    MESSAGE_LOGIN_PAGE_NOT_LOADED));

    theActor.attemptsTo(
            Enter.theValue(user.getUsername()).into(USERNAME_OR_EMAIL_ADDRESS),
            EnterAndHide.theValue(user.getPassword()).as("a password").into(PASSWORD),
            Click.on(SIGN_IN));

    theActor.should(seeThat(the(DASHBOARD), isVisible())
            .orComplainWith(StartError.class,
                    MESSAGE_FAILED_AUTHENTICATION));
}
 
Example #2
Source File: Start.java    From serenity-cucumber-bdd-screenplay with Apache License 2.0 5 votes vote down vote up
@Step("{0} starts and performs the step **#title**")
public <T extends Actor> void performAs(T actor) {
    actor.attemptsTo(
            Open.browserOn().the(applicationHomePage),
            Refresh.theBrowserSession()
           ,Check.whether(steps != null).andIfSo(Task.where(title, steps))
    );
}
 
Example #3
Source File: InicioSesionStepDefinition.java    From screenplay-dojo with MIT License 4 votes vote down vote up
@Given("^(.*) quiere autenticarse$")
public void quiereAutenticarse(String actorName) {
    theActorCalled(actorName).attemptsTo(
            Open.browserOn(inicioSesionPage)
    );
}
 
Example #4
Source File: NavigateTo.java    From serenity-cucumber-starter with Apache License 2.0 4 votes vote down vote up
public static Performable theWikipediaHomePage() {
    return Task.where("{0} opens the Wikipedia home page",
            Open.browserOn().the(WikipediaHomePage.class));
}
 
Example #5
Source File: OpenTheApplication.java    From serenity-documentation with Apache License 2.0 4 votes vote down vote up
@Step("{0} opens the application on the home page")
public <T extends Actor> void performAs(T actor) {
    actor.attemptsTo(Open.browserOn().the(applicationHomePage));
}
 
Example #6
Source File: StartWith.java    From tutorials with MIT License 4 votes vote down vote up
@Step("{0} starts a google search")
public <T extends Actor> void performAs(T t) {
    t.attemptsTo(Open.browserOn().the(googleSearchPage));
}