I'm in the following environment:
1. I'm using Graphene to test an already deployed application, so I'm not using @Deployment method in my Test.
2. I have a Graphene page abstraction annotated with @Location(value="/faces/login.xhtml")
When I run my test I received the following error trace:
java.lang.IllegalStateException: The location @org.jboss.arquillian.graphene.page.Location(value=/faces/login.xhtml) is not valid URI and no contextRoot was discovered to treat it as relative URL
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
I suppose that the error is due to I'm not using @Deployment method and without it, the test is not able to discover what is the contextRoot to append to my current @Location.
I can change the location to use the full URL: @Location(value="http://my.server.com/myapp/faces/login.xhtml")
With this change my test run without problems but I don't want a hardcode value since the test will be executed on different environments and the context root could change. Also, I would like to reuse my page abstraction.
So the questions are:
1. Is the contextRoot unknown due to I'm not using a @Deployment method?
2. How can I initialize the contextRoot to do the @Location(value="/faces/login.xhtml") work in this environment?
3. It is possible use dynamic URLs in the @Location?
Thank you very much in advance.