Hi Jack,
I guess you have a classpath conflict regarding Apache Xalan. HtmlUnit depends
on Xalan so if you have an old version in your classpath or in your endorsed
directory it may lead to this kind of issue. If you are using Maven, could you
please send us the result of
mvn dependency:tree
Regards,
Julien
________________________________
De : Jack Pham <jack.p...@infomart-usa.com>
À : jwebunit-users@lists.sourceforge.net
Envoyé le : Mardi, 28 Avril 2009, 23h00mn 40s
Objet : [JWebUnit-users] random NoSuchMethod
Trying to use assertChecboxPresent, assertCheckboxNotSelected,
checkCheckbox
gives NoSuchMethodErrors. I also have this problem
with submit() but worked around it by trying different submits
to find the submit button. I’m sure I’m
doing something wrong, but I don’t know what’s going on.
html for checkbox:
<input type="checkbox" name="gcon" />Click
here
[junit] ------------- ----------------
---------------
[junit] Testcase:
testSpecialCharacters(TestSpecialChars): Caused
an ERROR
[junit]
org.apache.xpath.compiler.FunctionTable.installFunction(Ljava/lang/String;Ljava/lang/Class;)I
[junit] java.lang.NoSuchMethodError:
org.apache.xpath.compiler.FunctionTable.installFunction(Ljava/lang/String;Ljava/lang/Class;)I
[junit] at
com.gargoylesoftware.htmlunit.html.xpath.XPathAdapter.initFunctionTable(XPathAdapter.java:58)
[junit] at
com.gargoylesoftware.htmlunit.html.xpath.XPathAdapter.(XPathAdapter.java:72)
[junit] at
com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.evaluateXPath(XPathUtils.java:108)
[junit] at
com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.getByXPath(XPathUtils.java:63)
[junit] at
com.gargoylesoftware.htmlunit.html.DomNode.getByXPath(DomNode.java:1356)
[junit] at
com.gargoylesoftware.htmlunit.html.DomNode.getFirstByXPath(DomNode.java:1371)
[junit] at
net.sourceforge.jwebunit.htmlunit.HtmlUnitTestingEngineImpl.getHtmlElementByXPath(HtmlUnitTestingEngineImpl.java:899)
[junit] at
net.sourceforge.jwebunit.htmlunit.HtmlUnitTestingEngineImpl.getHtmlElementByXPath(HtmlUnitTestingEngineImpl.java:895)
[junit] at
net.sourceforge.jwebunit.htmlunit.HtmlUnitTestingEngineImpl.hasElementByXPath(HtmlUnitTestingEngineImpl.java:1824)
[junit] at
net.sourceforge.jwebunit.junit.WebTester.assertCheckboxPresent(WebTester.java:895)
[junit] at
net.sourceforge.jwebunit.junit.WebTestCase.assertCheckboxPresent(WebTestCase.java:755)
[junit] at
TestSpecialChars.testSpecialCharacters(TestSpecialChars.java:46)
[junit] at
net.sourceforge.jwebunit.junit.WebTestCase.runBare(WebTestCase.java:79)
GET THE WHOLE STORY
Criminal
- Credit - Driving - Education - Employment - Drug - Assessments
http://www.infomart-usa.com
Ask about how we can automate your screening
program!
The information
contained in this email is privileged, confidential and protected by
disclosure. If you think that you have received this email message in
error, please REPLY with "RECEIVED IN ERROR" in the Subject Box. We
apologize for any inconvenience and thank you for your time.
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
JWebUnit-users mailing list
JWebUnit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users