Has anyone successfully used HttpUnit or JWebUnit and Struts Modules? I've got a problem with it
The webpages have the <base> element set, It looks like if may not be supported in httpunit? http://www.w3.org/TR/1999/REC-html401-19991224/struct/links.html#h-12.4 Example of problem.. I have a webpage: url = http://localhost:8080/webgui/administration/User.do?fn=list <html> <head> <base href="http://localhost:8080/webgui/" /> .. </head> <body> <a id='addUser' href='administration/User.do?fn=add'>Add user...</a> </body> My test function looks like this: public void testMainPageLinks () throws SAXException, IOException { WebConversation wc = new WebConversation(); java.net.URL urlBase = new java.net.URL( "http://localhost:8080/webgui/" ); WebRequest req = new GetMethodWebRequest( urlBase, "administration/User.do? fn=list" ); WebResponse resp = wc.getResponse( req ); WebLink link = resp.getLinkWithID( "addUser" ); LOG.info("Link URL = " + link.getURLString()); link.click(); } >> Link URL = administration/User.do?fn=add Click link is broken.. com.meterware.httpunit.HttpNotFoundException: Error on HTTP request: 404 Invalid path was requested [http://localhost:8080/webgui/administration/administration/User. do?fn=add] at com.meterware.httpunit.WebClient.validateHeaders(WebClient.java:575) Problem is duplicate /administration in the URL, thats why I think base isn't been used If anyone knows of a workaround or can spot if I'm doing something wrong, I'd appreciate the feedback Thanks Tony --------------------------------------------------------------------- Posted via Jive Forums http://forums.opensymphony.com/thread.jspa?threadID=32312&messageID=62577#62577 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]