这次我正在使用 Groovy 试用 Arquillian Drone 和 Graphene,我有以下 2 个测试我想做的是让第二个测试使用第一个测试中的浏览器。但是浏览器在第一次测试完成后关闭 - 有没有办法将浏览器传递给第二次测试?
@RunWith(ArquillianSputnik)
@RunAsClient
@Stepwise
class testclass extends Specification {
@Drone
private WebDriver browser;
@Page
SubPage subPage
@ArquillianResource
URL url
def 'It should navigate to subscription page'() {
when: 'I go to subscription page'
browser.get('http://localhost:8585/');
then: 'It should should enter sub name'
subPage.enterName("Name")
}
def "Enter subdescription"() {
when: "I enter a sub description"
sub.enterDescription('Description')
then: "Subscription description should be visible in description input field"
}