lundi 22 mai 2017

How do i pass the browser from test to test with Arquillian Drone and Graphene

I'm trying out Arquillian Drone and Graphene and I have the following 2 tests what i want to do is have the second test use the browser from the first tests. but the browser closes after the first test finishes - is there a way to pass the browser to the second test?

@RunAsClient
public class Test1 extends Arquillian{

private final String subscriptionName = "subName";
private final String subscriptionDescription = "description";

@Test(dataProvider = Arquillian.ARQUILLIAN_DATA_PROVIDER)
public void enterSubscriptionName(@InitialPage SubscriptionPage subscriptionPage) {
    subscriptionPage.enterName(subscriptionName);
    assertEquals(subscriptionName, subscriptionPage.getNameFieldValue());
}

@Test(dataProvider = Arquillian.ARQUILLIAN_DATA_PROVIDER)
public void enterSubscriptionDescription( SubscriptionPage subscriptionPage) {
    subscriptionPage.enterDescription(subscriptionDescription);
    assertEquals(subscriptionDescription, subscriptionPage.getDescriptionFieldValue());
}

}

Aucun commentaire:

Enregistrer un commentaire