Open Errr0rr404 opened 5 years ago
You could do this fairly easily using Screenplay, e.g.
public class AddTodosWithDifferentActors {
private Actor james = Actor.named("James");
private Actor jill = Actor.named("Jill");
@Managed(driver = "firefox")
private WebDriver hisBrowser;
@Managed(driver = "chrome")
private WebDriver herBrowser;
@Before public void jamesCanBrowseTheWeb() {
james.can(BrowseTheWeb.with(hisBrowser));
jill.can(BrowseTheWeb.with(herBrowser));
}
@Test
public void should_be_able_to_complete_a_todo() {
givenThat(james).wasAbleTo(Start.withAnEmptyTodoList());
andThat(jill).wasAbleTo(Start.withAnEmptyTodoList());
when(james).attemptsTo(
AddATodoItem.called("Walk the dog")
);
when(jill).attemptsTo(
AddATodoItem.called("Feed the dog")
);
then(james).should(
seeThat(TheItemStatus.forTheItemCalled("Walk the dog"), is(Active))
);
and(jill).should(
seeThat(TheItemStatus.forTheItemCalled("Feed the dog"), is(Active))
);
}
}
I'm trying to launch my browser while I have some tests running on Mobile Device.
My test case looks like this :
so for this, once I'm calling new browser instance in the code, Serenity is still taking the screenshot from the previous instantiated browser. how do i make serenity take screenshot and report from both driver instance ??