trying to use Drone for testing as a client I do get the below exception. Although the login form does have the given id and the field "loginname" the test run says it can't find the id. It fails for both DefaultSelenium and GrapheneSelenium (test classes see below). What is missing / wrong? I tried to follow the example given on http://arquillian.org/guides/functional_testing_using_drone/ Sorry for all the code postings below but it could be useful to track the problem down.

com.thoughtworks.selenium.SeleniumException: ERROR: Element id=loginForm:loginname not found

at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:112)

at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:106)

at com.thoughtworks.selenium.DefaultSelenium.type(DefaultSelenium.java:317)

at de.comp.login.LoginTestSelenium.loginUserClient(LoginTestSelenium.java:41)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)

at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)

at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:270)

at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)

at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)

at org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:53)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)

at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)

at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111)

at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:263)

at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:226)

at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)

at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)

at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240)

at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)

at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)

at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)

at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)

at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)

at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)

at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185)

at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)

at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)

at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)

at org.junit.runners.ParentRunner.run(ParentRunner.java:300)

at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)

at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Output on console

log4j:WARN No appenders could be found for logger (org.jboss.logging).

Here is the solution: in the packaging class faces-config.xml needs to be added explicitly with

.addAsWebInfResource(EmptyAsset.INSTANCE, "faces-config.xml")

It obviously is not enough to add the whole directory (see 1st posting above) which does add the file as well - but not being empty. If added as an empty asset the file really is empty. It possibly does have to do with the automatically generated file WEB-INF/.faces-config.xml.jsfdia but I am not sure.

In the API itself I couldn't find the answer on what does make the difference. I'd highly appreciate it if someone could point me into the right direction to find the answer to that question since it seems it is very important on how the archive is generated using the deployment method.