From: J. S. <the...@gm...> - 2009-03-05 15:05:26
|
Hi Daniel, 1. Unfortunately, I need the scripts on the webpage itself, just not the remote scripts (as they are mostly ad junk and such) 2. Already did that. Still getting exceptions. 3. I'll have to look into that. I don't know anything at all about XPath yet, any advice on what to read ? _____ Von: Daniel Gredler [mailto:djg...@gm...] Gesendet: Thursday, March 05, 2009 3:08 PM An: htm...@li... Betreff: Re: [Htmlunit-user] Three questions - exceptions,tree navigating and loading of external resources Hi J, 1. Images are never downloaded, except in rare corner cases; external JS files are not downloaded if you disable JS on the WebClient; external CSS files are not downloaded if you disable CSS on the WebClient. 2. WebClient.setThrowExceptionOnScriptError(false) 3. Not sure about you exact scenario, but DomNode.getByXPath() and DomNode.getFirstByXPath() are your friends. XPath can be bent to satisfy most needs :-) Take care, Daniel On Thu, Mar 5, 2009 at 5:16 AM, J. Stoever <the...@gm... <blocked::mailto:the...@gm...> > wrote: Hi, I couldn't find the answer to either of this via Google & Co: External resources: is there a way to prevent WebClient from loading external resources such as images and external scripts ? Exceptions: I sometimes get long exceptions from scripts that don't run well. I don't really care about those, since in my case they don't require any reaction on my part, so I would like to quiet them, but I can't figure out how. Ideas ? Tree navigating: I'm trying to find a way to, for example, get a list of all top level tables, then select one of those tables, get a list of all it's subtables, and so on. Unfortuneately, I have only found ways to search for ALL children, so my first request returns ALL tables, not just top level tables. Any ideas ? ---------------------------------------------------------------------------- -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H <blocked::http://p.sf.net/sfu/XcvMzF8H> _______________________________________________ Htmlunit-user mailing list Htm...@li... <blocked::mailto:Htm...@li...> https://lists.sourceforge.net/lists/listinfo/htmlunit-user <blocked::https://lists.sourceforge.net/lists/listinfo/htmlunit-user> -- Daniel Gredler http://daniel.gredler.net/ <blocked::http://daniel.gredler.net/> |