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

In serenity-appium-screenplay-poc code leads to app restart #2092

Closed
fedeolto opened this issue May 19, 2020 · 0 comments
Closed

In serenity-appium-screenplay-poc code leads to app restart #2092

fedeolto opened this issue May 19, 2020 · 0 comments

Comments

@fedeolto
Copy link

I used serenity-appium-screenplay-poc as boilerplate for a test suite and discovered that in net.poc.steps.NoteUserSteps class, in the @Given clause, the statement:

theActorCalled(actorName).can(BrowseTheWeb.with(herMobileDevice));

leads to a double instantiation of the Appium webdriver that causes the application under test opening twice.

A possible solution is invoking simply:

theActorCalled(actorName);

This is due to the fact that net.serenitybdd.screenplay.actors.OnStage#theActorCalled eventually calls net.serenitybdd.screenplay.actors.OnlineCast#actorNamed in which:

if (newActor.abilityTo(BrowseTheWeb.class) == null) {
  newActor.can(BrowseTheWeb.with(theDefaulteBrowserFor(actorName)));
}
@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants