1

我正在使用,和来Arquillian 1.1.6.Final测试。它工作得很好,给了我一个预期的结果。JSFArquillian Drone 2.0.0.Alpha3Arquillian Graphene 2.1.0.Alpha2Arquillian Browser Screenshooter 2.1.0.Alpha2screen shot

Arquillian Drone当我使用org.jboss.arquillian.drone.api.annotation.Qualifieras时有一些麻烦

java.lang.IllegalStateException: There is no context available for qualifier org.jboss.arquillian.drone.api.annotation.Default. 
Available contexts are [interface test.com.scc.aspg.demo.arq.simple.MyExtraBrowser].
at org.jboss.arquillian.graphene.context.GrapheneContextImpl$LazyContext.getContext(GrapheneContextImpl.java:302)
at org.jboss.arquillian.graphene.context.GrapheneContextImpl$LazyContext$1.getTarget(GrapheneContextImpl.java:311)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.getTarget(GrapheneProxyHandler.java:149)
at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:118)
at com.sun.proxy.$Proxy336.unwrap(Unknown Source)
at org.arquillian.extension.recorder.screenshooter.browser.impl.BrowserScreenshooter.getTakingScreenshotsBrowser(BrowserScreenshooter.java:158)

我的代码如下: -

import org.jboss.arquillian.drone.api.annotation.Qualifier;

@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.PARAMETER })
@Qualifier
public @interface MyExtraBrowser {

}

@RunWith(Arquillian.class)
public class DroneTest {

    @Drone
    @MyExtraBrowser //<---This works without Arquillian Browser Screenshooter
    private WebDriver browser;

    @Test
    @RunAsClient
    public void ensureIndexPage() {
        try{
            browser.get("http://www.google.com")
        } catch (Exception e){
            e.printStackTrace();
        }
    }
}

你能帮忙提供进一步的建议吗?

4

1 回答 1

1

这是在 2.1.0.Alpha2 中修复的错误ARQGRA-467,应该修复它。

有关详细信息,请参阅https://github.com/arquillian/arquillian-recorder/issues/10

也许你应该在那里添加评论。

于 2016-02-27T06:13:38.923 回答