Here is the config/option tag to ignore these errors should you choose
to go that route:
<config description="Temporary workaround for htmlunit failing on 404
for js files not found. Fixed in upcoming htmlunit release.">
<option name="ThrowExceptionOnScriptError" value="false" />
</config>
On Dec 20, 2007 3:08 AM, Marc Guillemot <[EMAIL PROTECTED]> wrote:
> Hi,
>
> this means that your page references the javascript file
> http://localhost:8080/LIFT/plugins/jsecurity-0.1.1/j/application.js
> which doesn't exist.
>
> "normal" browsers simply ignore it but WebTest helps to find potential
> errors that may cause troubles later like this and complains (in fact,
> with next HtmlUnit version it won't be reported as an error anymore but
> just as a warning).
>
> In such a case, the wise way is to fix your application. If you don't
> want (or can't), you can configure WebTest to ignore js errors but...
>
> Marc.
> --
> Blog: http://mguillem.wordpress.com
>
>
> Ruslan Roz wrote:
> > I have been using the Canoo WebTest plugin for functional testing of Grails
> > application.
> > When I run following test method:
> >
> > def testLoginLogOutListNewDelete() {
> > webtest('teLoginLogOut basic operations: view list, create new
> > entry, view, edit, dele, view') {
> > invoke(url: "http://localhost:8080/LIFT/auth/login")
> > }
> > }
> >
> > I get the following errors:
> >
> > [java] INFO (com.canoo.webtest.steps.request.TargetHelper) - getting
> > response for url: http://localhost:8080/LIFT/auth/login
> > 2007-12-18 15:07:41.192:/LIFT:INFO: GSP servlet initialized
> > 2007-12-18 15:07:44.926:/LIFT:INFO: Initializing Spring FrameworkServlet
> > 'grails-errorhandler'
> > [java] ERROR (com.gargoylesoftware.htmlunit.html.HtmlPage) - Error
> > loading javascript from
> > [http://localhost:8080/LIFT/plugins/jsecurity-0.1.1/j
> > /application.js] status=[404 Not Found]
> > [java] ERROR (com.gargoylesoftware.htmlunit.html.HtmlPage) - Error
> > loading javascript from
> > [http://localhost:8080/LIFT/plugins/jsecurity-0.1.1/j
> > /application.js]:
> > [java] com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException:
> > 404 Not Found for http://localhost:8080/LIFT/plugins/jsecurity-0.1.1/js/app
> > ication.js
> > [java] at
> > com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.j
> > ava:845)
> > [java] at
> > com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlP
> > age.java:775)
> > [java] at
> > com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScri
> > pt.java:229)
> >
> > Anyone know what the problem is? Thanks.
> >
> > Ruslan
> >
> >
> > _______________________________________________
> > WebTest mailing list
> > [email protected]
> > http://lists.canoo.com/mailman/listinfo/webtest
> >
>
>
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
>
--
Craig
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest