I'm trying to test some WUIs with the Drone extension but I have a problem with the URL the DefaultSelenium is trying to open. Even when I instruct the remote to open a .jsf page with
browser.open(deploymentUrl + "registration/index.jsf");
it tries to open a .jsp page and of course is not found
The requested resource (/test-war/registration/index.jsp) is not available.
I tryed to force the pattern and added a web.xml including
<servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.jsf</url-pattern> </servlet-mapping>
But got the same result.
I'm using the following BOMs
<!-- Arquillian --> <dependency> <groupId>org.jboss.arquillian</groupId> <artifactId>arquillian-bom</artifactId> <version>1.0.2.Final</version> <scope>import</scope> <type>pom</type> </dependency> <!-- Drone --> <dependency> <groupId>org.jboss.arquillian.extension</groupId> <artifactId>arquillian-drone-bom</artifactId> <version>1.0.0.Final</version> <type>pom</type> <scope>import</scope> </dependency>
Any idea why the .jsf in replaced for .jsp?
Thanks in advance.
Hello Karel, thank you for your reply.
I've deployed the test war and got the same HTTP 404 error for the registration/index.jsp page, even when I've typed the right page in the URL box.
I've run the test again and payed more attention and found that in the Selenium command history that it's also calling the right page
but the error message is the one changing the extension
Message HTTP Status 404 - /test-war/registration/index.jsp
Checking the server log there are no problems. I've pasted it here.
Thanks in advance.
In that case, can you compare archive generated by ShrinkWrap and archive generated via Maven/IDE (e.g. the app you know it works correctly)? The must be some resource missing in the first, so jsp redirect is triggered. You might be missing JSF impl, or a default suffix settings, or something JSF related (maybe this can help: http://stackoverflow.com/questions/9559430/jsf-xhtml-mapping-not-working-redirected-to-jsp ).
I expect this has nothing to do with Drone/Selenium.