From: Simon K. <sim...@pr...> - 2003-06-25 11:56:50
|
<html><div>Have just started using HTMLUnit and thank the authors for good software.</div> <br> <div>I had this ...SimpleLog... error today when using JUnit using HTMLUnit. The mail archives had a thread on this issue but no solution. I've since found that using JUnit's swing GUI with 'Reload classes every run' switched on causes the problem. This invokes its own classloader which trips up the logging code.</div> <br> <div>BTW, is their any plan to support XPath (eg. JXPath) for finding elements in the DOM?</div> <br> <div>Thanks,</div> Simon <br> <font size=2><br><br> <b>Simon Kahl<br> Component Architect<br> Prophecy International Pty Ltd<br> </b>41 Dequetteville Terrace<br> KENT TOWN South Australia 5067<br> Phone: + 61 8 8364 4411<br> Fax: + 61 8 8364 4454<br> Email: <a href="mailto:sim...@pr...">sim...@pr...</a><br> Web: </font><a href="http://www.prophecyopen.com/" eudora="autourl"><font size=2 color="#0000FF"><u>www.prophecyopen.com</a></u></font><font size=2> & </font><a href="http://www.velatte.com/" eudora="autourl"><font size=2 color="#0000FF"><u>www.velatte.com</a></font></u></html> |
From: Mike B. <mb...@Ga...> - 2003-06-25 12:24:49
|
Simon Kahl wrote: > I had this ...SimpleLog... error today when using JUnit using HTMLUnit. > The mail archives had a thread on this issue but no solution. I've > since found that using JUnit's swing GUI with 'Reload classes every run' > switched on causes the problem. This invokes its own classloader which > trips up the logging code. I recall the problem but since I never use the GUI test runner, this hasn't been an issue for me. (I find my tests run significantly slower from the gui test runner than they do from the command line test runner) Perhaps someone else has a better idea of what the real problem is and how it can be fixed. > BTW, is their any plan to support XPath (eg. JXPath) for finding > elements in the DOM? I'm not sure if there is a feature request open for this but I have planned to add this support for a while. If there isn't a feature request, you may want to add one so that it happens sooner rather than later ;-) -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Christian S. <chr...@ne...> - 2003-06-25 12:59:15
|
Simon Kahl wrote: > Have just started using HTMLUnit and thank the authors for good software. > > I had this ...SimpleLog... error today when using JUnit using HTMLUnit. > The mail archives had a thread on this issue but no solution. I've > since found that using JUnit's swing GUI with 'Reload classes every run' > switched on causes the problem. This invokes its own classloader which > trips up the logging code. > > BTW, is their any plan to support XPath (eg. JXPath) for finding > elements in the DOM? theres nothing preventing you from using it today. Below are 2 (untested) snippets for Jaxen and JXPath (I prefer Jaxen). Note that the xpath expression has to be applied to the w3c DOM kept inside the page, and has to be mapped back to the HtmlElement after retreival. There has recently been some discussion about the need of the latter operation ;-). //Jaxen Code: ///// HtmlPage page = ...; XPath xpath = new DOMXPath("/HTML"); Element w3cHtml = (Element)xpath.selectNodes(page.getElement()).get(0); HtmlElement html = page.getHtmlElement(w3cElement); //JXPath ///// HtmlPage page = ...; CompiledExpression expr = JXPathContext.compile("/HTML"); JXPathContext context = JXPathContext.newContext(page.getDocument()); Iterator it = expr.iteratePointers(context); Element w3cHtml = (Element)it.next(); HtmlElement html = page.getHtmlElement(w3cElement); > > Thanks, > Simon > > > *Simon Kahl > Component Architect > Prophecy International Pty Ltd > *41 Dequetteville Terrace > KENT TOWN South Australia 5067 > Phone: + 61 8 8364 4411 > Fax: + 61 8 8364 4454 > Email: sim...@pr... > <mailto:sim...@pr...> > Web: _www.prophecyopen.com_ <http://www.prophecyopen.com/> & > _www.velatte.com_ > <http://www.velatte.com/>------------------------------------------------------- > This SF.Net email is sponsored by: INetU Attention Web Developers & > Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. > We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed > Hosting http://www.inetu.net/partner/index.php > _______________________________________________ HtmlUnit-develop mailing > list Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-develop |