Hi Pranay,

This error has nothing to do with your code but is likely a classpath issue.

Please check that you are using htmlunit-2.5 and nekohtml 1.9.12.

Also check that your JDK endorsed directory doesn't override some dependencies.

Regards,

Julien




________________________________
De : Pranay Prabhat <prabhat.pra...@gmail.com>
À : jwebunit-users@lists.sourceforge.net
Envoyé le : Jeudi, 23 Juillet 2009, 13h47mn 11s
Objet : [JWebUnit-users] Problem while running JwebUnit tests

Hi,


Day before yesterday i was browsing through internet to find out the best 
possible testing framework for web applications in my project. I was really 
impressed by the postings in JwebUnit and tried to implement that rightaway in 
my projects.

But i landed in a problem and was not able to come out of it for more than a 
day.

I have put all the jars provided in the jwebunit-2.2-release.zip in my class 
path. I am running the below simple test case through ant 1.6.5. I always get 
the below error :-

"    [junit] unable to create HTML parser
    [junit] com.gargoylesoftware.htmlunit.ObjectInstantiationException: unable 
to create HTML parser"

"    [junit] Enclosed exception: org.xml.sax.SAXNotRecognizedException: Feature 
'
http://cyberneko.org/html/features/parse-noscript-content' is not recognized."



The simple junit i am running is :-

package xyz;

import net.sourceforge.jwebunit.junit.WebTestCase;
import net.sourceforge.jwebunit.junit.WebTester;


public class ExampleWebTestCase extends WebTestCase {
    private WebTester tester;
    public void setUp() throws Exception {
        super.setUp();
        tester = new WebTester();
        tester.setBaseUrl(<<<my url>>>);
    }

    public void test1() {
        tester.beginAt("/");
        tester.assertTextPresent("Group");
    }
}

Any help will be highly appreciated.

Thanks,
Pranay.


      
------------------------------------------------------------------------------
_______________________________________________
JWebUnit-users mailing list
JWebUnit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to