From: Marc G. <mgu...@ya...> - 2007-09-17 17:57:48
|
Hi Ahmed, sorry, I couldn't look at it previously. Is your question still valid? I couldn't reproduce any error. Cheers, Marc. -- Blog: http://mguillem.wordpress.com Ahmed Ashour wrote: > Dear all, > > As strange as it might seem, offline testing (by MockWebConnection) is > different than putting the files in web server. > > The example can be taken from XMLElementTest.testAttributes(). > > To reproduce: > 1- System.out.println(firstContent) and secondContent > 2- Save them in let's say: one.html and two.xml. > 3- Change the 'doc.load' to load from 'two.xml' instead of > 'http://second'. > 4- Put them in webserver (I use Tomcat 6.0.14) > 5- Try to load the one.html from the webserver, you will have: > com.gargoylesoftware.htmlunit.ScriptException: Wrapped > java.lang.IllegalStateException: DomNode has not been set for this > SimpleScriptable: > com.gargoylesoftware.htmlunit.javascript.host.XMLDocument (script in > http://localhost/htmlunit/one.html from (1, 39) to (0, 0)#5) > > I might have introduced a bug in XMLDocument, but even I believe > that offline test cases must exactly simulate online ones. > > I will try to investigate, but appreciate if someone can provide an > immediate hint. > > Many thanks, > Ahmed |