Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create multi driver via Actor #2762

Closed
anhphan-cwvn opened this issue Mar 31, 2022 · 1 comment
Closed

Cannot create multi driver via Actor #2762

anhphan-cwvn opened this issue Mar 31, 2022 · 1 comment

Comments

@anhphan-cwvn
Copy link

I have downloaded the sample code at here:
https://github.com/serenity-bdd/serenity-junit-screenplay-starter

After that, I changed the WhenSearchingForTerms.java:

package starter.wikipedia;

import net.serenitybdd.junit5.SerenityJUnit5Extension;
import net.serenitybdd.screenplay.Actor;
import net.serenitybdd.screenplay.abilities.BrowseTheWeb;
import net.serenitybdd.screenplay.actions.Open;
import net.serenitybdd.screenplay.ensure.Ensure;
import net.thucydides.core.annotations.Managed;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import net.serenitybdd.screenplay.annotations.CastMember;
import org.openqa.selenium.WebDriver;

import static net.thucydides.core.annotations.ClearCookiesPolicy.BeforeEachTest;

@ExtendWith(SerenityJUnit5Extension.class)
class WhenSearchingForTerms {


    @CastMember(name = "Staff", driver = "chrome")
    Actor staff;

    @CastMember(name = "Client", driver = "firefox")
    Actor client;

    @Test
    void searchBySingleKeyword() {
        staff.attemptsTo(
                Navigate.toTheHomePage(),
                Search.byKeyword("Everest"),
                Ensure.that(DisplayedArticle.firstHeading()).isEqualTo("Mount Everest")
        );
        client.attemptsTo(
                Open.url("https://24h.com")
        );

        staff.attemptsTo(Open.url("https://24h.com"));

        client.attemptsTo(Ensure.thatTheCurrentPage().title().isEqualTo("24h"));

    }
}

When executing that script, the text Website Disabled appeared:
https://yourimageshare.com/ib/uqLSySop4z

@wakaleo
Copy link
Member

wakaleo commented Mar 31, 2022

The website in question displays that message.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants