Re: links and js
"michael gross" <[email protected]>
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Message-ID | <[email protected]> |
i am trying to program a tool which can fallow links and cache html pages.
the best tool for this would probably be a scriptable browser. the best
tool i could find for that is httpunit.
it would be very insteresting if there is something else for this task but
i could not find anything.
i guess than that it is not possible to fallow every link with httpunit?
thanks for your help
best michael
> michael gross asked:
>> if I am running the fallowing lines
>>
>> response = conversation.getResponse( "www.google.ch" );
>> lk = response.getLinkWith("Personalisierte Startseite");
>> response = lk.click(); System.out.println(response.getText());
>>
>> I get the exception:
>>
>> org.mozilla.javascript.JavaScriptException:
>> java.lang.NullPointerException
>> at
>> org.mozilla.javascript.JavaScriptException.wrapException(JavaS
>> criptException.java:70)
>> at
>> org.mozilla.javascript.FunctionObject.call(FunctionObject.java:418)
>> at
>> org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2169)
>> at
> [snip]
>> at
>> com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow
>> .java:130)
>> at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:121)
>> at com.meterware.httpunit.WebWindow.sendRequest(WebWindow.java:110)
>> at
>> com.meterware.httpunit.WebRequestSource.submitRequest(WebReque
>> stSource.java:253)
>> at
>> com.meterware.httpunit.WebRequestSource.submitRequest(WebReque
>> stSource.java:232)
>> at com.meterware.httpunit.WebLink.click(WebLink.java:98)
>> at gourmondo.get_site(gourmondo.java:42)
>> at gourmondo.main(gourmondo.java:13)
>>
>>
>> what could be the problem, that i can not open this page?
>
> The problem is that the Rhino interpreter that HttpUnit uses for
> Javascript can't handle something on that page. Perhaps it's the fact
> that there's no handler for videos, but there's so much javascript there
> that I can't tell.
>
> What are you trying to accomplish? If you're just trying to use
> HttpUnit to script some page scraping, there are probably tools out
> there designed for that.
>
> - George
> http://www.idiacomputing.com/
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Httpunit-develop mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/httpunit-develop
>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642