File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes javascript.EcmaError: createElement in httpunit Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "javascript.EcmaError: createElement in httpunit " Watch "javascript.EcmaError: createElement in httpunit " New topic
Author

javascript.EcmaError: createElement in httpunit

Amit kull
Ranch Hand

Joined: Jun 05, 2008
Posts: 46
I have written a test class to test my web application. I use httpunit 1.7 libraries (httpunit.jar and other libraries like js-1.6R5.jar, etc)
When I run the test case, I get all the links which are present on my JSP. But when I try to invoke click() method of any link (WebResponse resp = registerLink.click() , I get the following error:
javascript.EcmaError: TypeError: Cannot find function createElement

Could someone tell me what might be cause of this and how to fix it?
Thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35232
    
    7
Make sure that particular JavaScript function is supported by HttpUnit/Rhino. The HttpUnit documentation has a list somewhere that shows which JavaScript functionalities are or are not supported.


Android appsImageJ pluginsJava web charts
Amit kull
Ranch Hand

Joined: Jun 05, 2008
Posts: 46
Thanks Ulf.
 
jQuery in Action, 2nd edition
 
subject: javascript.EcmaError: createElement in httpunit
 
Similar Threads
javascript DOM
Web unit testing, when main app to be tested is not running
Anyone used HttpUnit with Weblogic?
HttpUnit test problem
httpunit javascript.EcmaError: createElement