{"action":"created","issue":{"url":"https://api.github.com/repos/arquillian/arquillian-recorder/issues/10","repository_url":"https://api.github.com/repos/arquillian/arquillian-recorder","labels_url":"https://api.github.com/repos/arquillian/arquillian-recorder/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/arquillian/arquillian-recorder/issues/10/comments","events_url":"https://api.github.com/repos/arquillian/arquillian-recorder/issues/10/events","html_url":"https://github.com/arquillian/arquillian-recorder/issues/10","id":47889289,"number":10,"title":"Tests fail when no Drone contexts exist","user":{"login":"mikesir87","id":746837,"avatar_url":"https://avatars.githubusercontent.com/u/746837?v=3","gravatar_id":"","url":"https://api.github.com/users/mikesir87","html_url":"https://github.com/mikesir87","followers_url":"https://api.github.com/users/mikesir87/followers","following_url":"https://api.github.com/users/mikesir87/following{/other_user}","gists_url":"https://api.github.com/users/mikesir87/gists{/gist_id}","starred_url":"https://api.github.com/users/mikesir87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikesir87/subscriptions","organizations_url":"https://api.github.com/users/mikesir87/orgs","repos_url":"https://api.github.com/users/mikesir87/repos","events_url":"https://api.github.com/users/mikesir87/events{/privacy}","received_events_url":"https://api.github.com/users/mikesir87/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2014-11-05T21:18:56Z","updated_at":"2017-02-18T23:53:01Z","closed_at":null,"body":"Quick question, as I'm not sure if this is a bug or if I'm actually doing something wrong.  I'm using the Graphene Screenshooter, by enabling it in my arquillian.xml.  It works flawlessly when running tests that use Drone.  \n\nHowever, for tests that don't use Graphene, I get the exception below.  Example tests are container-mode tests where we're testing various beans or REST endpoints where we're using a Jersey client to test our endpoints.\n\nIs there a suggested way to work around this issue?  Should we simply use a separate arquillian.xml for non-Drone tests?  Is there a way to programatically enable the screenshooter extension?  Is there something that can be done to prevent it from running if there is no Drone context?\n\n```\njava.lang.IllegalStateException: There is no context available for qualifier org.jboss.arquillian.drone.api.annotation.Default. Available contexts are [].\n    at org.jboss.arquillian.graphene.context.GrapheneContextImpl$LazyContext.getContext(GrapheneContextImpl.java:302)\n    at org.jboss.arquillian.graphene.context.GrapheneContextImpl$LazyContext$1.getTarget(GrapheneContextImpl.java:311)\n    at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.getTarget(GrapheneProxyHandler.java:149)\n    at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:114)\n    at com.sun.proxy.$Proxy52.unwrap(Unknown Source)\n    at org.arquillian.extension.recorder.screenshooter.browser.impl.BrowserScreenshooter.getTakingScreenshotsBrowser(BrowserScreenshooter.java:140)\n    at org.arquillian.extension.recorder.screenshooter.browser.impl.BrowserScreenshooter.takeScreenshot(BrowserScreenshooter.java:110)\n    at org.arquillian.extension.recorder.screenshooter.browser.impl.TakeScreenshotAndReportService.takeScreenshotAndReport(TakeScreenshotAndReportService.java:58)\n    at org.arquillian.extension.recorder.screenshooter.browser.impl.ScreenshotTaker.onTakeScreenshot(ScreenshotTaker.java:79)\n    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n    at java.lang.reflect.Method.invoke(Method.java:606)\n    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)\n    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)\n    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)\n    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)\n    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)\n    at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)\n    at org.arquillian.extension.recorder.screenshooter.impl.ScreenshooterLifecycleObserver.afterTest(ScreenshooterLifecycleObserver.java:101)\n    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n    at java.lang.reflect.Method.invoke(Method.java:606)\n    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)\n    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)\n    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)\n    at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)\n    at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createAfterContext(ContainerEventController.java:134)\n    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n    at java.lang.reflect.Method.invoke(Method.java:606)\n    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)\n    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)\n    at org.jboss.arquillian.testenricher.cdi.CreationalContextDestroyer.destory(CreationalContextDestroyer.java:44)\n    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n    at java.lang.reflect.Method.invoke(Method.java:606)\n    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)\n    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)\n    at org.jboss.arquillian.junit.extension.UpdateTestResultBeforeAfter.update(UpdateTestResultBeforeAfter.java:54)\n    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n    at java.lang.reflect.Method.invoke(Method.java:606)\n    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)\n    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)\n    at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102)\n    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n    at java.lang.reflect.Method.invoke(Method.java:606)\n    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)\n    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)\n    at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84)\n    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n    at java.lang.reflect.Method.invoke(Method.java:606)\n    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)\n    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)\n    at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65)\n    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n    at java.lang.reflect.Method.invoke(Method.java:606)\n    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)\n    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)\n    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)\n    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)\n    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.after(EventTestRunnerAdaptor.java:103)\n    at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:277)\n    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)\n    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)\n    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)\n    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)\n    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)\n    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)\n    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)\n    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)\n    at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193)\n    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345)\n    at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49)\n    at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207)\n    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)\n    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155)\n    ...\n```\n"},"comment":{"url":"https://api.github.com/repos/arquillian/arquillian-recorder/issues/comments/280884150","html_url":"https://github.com/arquillian/arquillian-recorder/issues/10#issuecomment-280884150","issue_url":"https://api.github.com/repos/arquillian/arquillian-recorder/issues/10","id":280884150,"user":{"login":"FibreFoX","id":1042579,"avatar_url":"https://avatars.githubusercontent.com/u/1042579?v=3","gravatar_id":"","url":"https://api.github.com/users/FibreFoX","html_url":"https://github.com/FibreFoX","followers_url":"https://api.github.com/users/FibreFoX/followers","following_url":"https://api.github.com/users/FibreFoX/following{/other_user}","gists_url":"https://api.github.com/users/FibreFoX/gists{/gist_id}","starred_url":"https://api.github.com/users/FibreFoX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FibreFoX/subscriptions","organizations_url":"https://api.github.com/users/FibreFoX/orgs","repos_url":"https://api.github.com/users/FibreFoX/repos","events_url":"https://api.github.com/users/FibreFoX/events{/privacy}","received_events_url":"https://api.github.com/users/FibreFoX/received_events","type":"User","site_admin":false},"created_at":"2017-02-18T23:53:01Z","updated_at":"2017-02-18T23:53:01Z","body":"Maybe I have found a scenario when this happens: when there is no \"default\"-drone, this still fails to work for me.\r\n\r\nsrc/test/resources/arquillian.xml\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<arquillian xmlns=\"http://jboss.org/schema/arquillian\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd\">\r\n    <extension qualifier=\"webdriver-firefox\">\r\n        <property name=\"remote\">true</property>\r\n        <property name=\"remoteAddress\">http://localhost:5555/wd/hub</property>\r\n        <property name=\"browser\">firefox</property>\r\n    </extension>\r\n    <extension qualifier=\"webdriver-chrome\">\r\n        <property name=\"remote\">true</property>\r\n        <property name=\"remoteAddress\">http://localhost:5556/wd/hub</property>\r\n        <property name=\"browser\">chrome</property>\r\n    </extension>\r\n</arquillian>\r\n```\r\nsrc/test/java/SimpleWebsiteTest.java\r\n```java\r\n@RunWith(Arquillian.class)\r\n@RunAsClient\r\npublic class SimpleWebsiteTest {\r\n\r\n    @Drone\r\n    @Chrome\r\n    private WebDriver chrome;\r\n\r\n    @Drone\r\n    @Firefox\r\n    private WebDriver firefox;\r\n\r\n    @Test\r\n    public void firstSimpleTest() {\r\n        // any website should work\r\n        browser.get(\"http://www.arquillian.org\");\r\n        Graphene.waitGui();\r\n        Assert.fail();\r\n    }\r\n}\r\n```\r\n\r\nThe browser-qualifiers are done like this:\r\n```java\r\nimport java.lang.annotation.ElementType;\r\nimport java.lang.annotation.Retention;\r\nimport java.lang.annotation.RetentionPolicy;\r\nimport java.lang.annotation.Target;\r\nimport org.jboss.arquillian.drone.api.annotation.Qualifier;\r\n\r\n@Retention(RetentionPolicy.RUNTIME)\r\n@Target({ElementType.FIELD, ElementType.PARAMETER})\r\n@Qualifier\r\npublic @interface Chrome {\r\n\r\n}\r\n```\r\n\r\nWhile Graphene supports multiple browsers running in parallel, there seems no documentation for the screenshooter to be controlled ... or am I missing something?"}}
{"actor":{"display_login":"FibreFoX"}}