NullPointerException with example
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Message-ID | <[email protected]> |
When I run the example, I get a Exception: java.lang.NullPointerException on this line: response = httpunitLink.click(); from the previous 2 lines: WebResponse response = wc.getResponse( request ); // find the link which contains the string "HttpUnit" and click it WebLink httpunitLink = response.getFirstMatchingLink( WebLink.MATCH_CONTAINED_TEXT, "HttpUnit" ); it appears to be looking for a link with "HttpUnit" in it. In html in the response (below), I do not see such a link. Is there an error in the example, or am I doing something incorrectly? <HTML><HEAD> <META NAME="description" CONTENT="meterware.com"> <META NAME="keywords" CONTENT=""> </HEAD> <FRAMESET border=0 rows="100%,*" frameborder="no" marginleft=0 margintop=0 <marginright=0 marginbottom=0> <frame src="http://www2.meterware.com:8080" scrolling=auto <frameborder="no" border=0 noresize> <frame topmargin="0" marginwidth=0 scrolling=no marginheight=0 <frameborder="no" border=0 noresize> </FRAMESET> </HTML> > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Httpunit-develop mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/httpunit-develop > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/