Here is a description what could be done in Canoo Webtest to be compatible with the new jQuery - based on the latest HTMLUnit snapshot - as described by Zdenek in
http://webtest-community.canoo.com/jira/browse/WT-497#action_12880
Assuming usage of the latest Canoo Webtest snapshot from
http://webtest.canoo.com/webtest/build.zip (currently R_1762)
1. Download:
http://build.canoo.com/htmlunit/artifacts/htmlunit-2.5-SNAPSHOT-with-dependencies.zip
2. Copy to the lib directory the following files:
- htmlunit-2.5-SNAPSHOT.jar
- htmlunit-core-js-2.5-SNAPSHOT.jar
- nekohtml-1.9.12-20090308.130127-11.jar
3. Remove older versions of the libraries given above correspondingly.
It seems like the URLs given by myself above (in previous comment) are no longer valid, since SNAPSHOT versions are not used any more because new HtmlUnit (stable 2.5) has been released today:
-
http://htmlunit.sourceforge.net/
-
http://sourceforge.net/project/showfiles.php?group_id=47038&package_id=39976&release_id=677331
Canoo in their builds also started using stable 2.5 versions too:
http://build.canoo.com/htmlunit/artifacts/ ->
http://build.canoo.com/htmlunit/artifacts//htmlunit-2.5-with-dependencies.zip
Since currently on
http://webtest.canoo.com/webtest/manual/Downloads.html the latest version of Canoo Webtest is R_1762 and this is the version which needs the patch described in previous comment, we can assume that the next Canoo Webtest release (R > 1762) will have 2.5 stable version of HtmlUnit and no more patching is needed!
It seems to be fixed in latest snapshot (Latest build: R_1765 / Posted: 27-Apr-2009 17:06) -
http://webtest.canoo.com/webtest/manual/changeLog.html - just download it from
http://webtest.canoo.com/webtest/build.zip
BTW. It seems to be connected to
WT-518 (which is now resolved)
I am seeing this issue in R_1799 with HtmlUnit-2.7-SNAPSHOT.jar in webtest R_1799. Running on the following platform:
Imac G4 PPC OSX 10.5.8, Java 1.5.0_16, jquery.js version 1.3.2.
Performed an SVN CO to check out the latest version of webtest, set environment. I have a simple script to just open a site and verify the title - if the site does not use jquery the test passes. If the site uses or loads jquery, the test fails with the error message:
Error:
JavaScript error loading page
http://sitename.internal.devserver/: TypeError: Cannot find function createComment in object [object].
I have tried both the 3.0 release and the R_1799 and receive the same error message, command to run tests is webtest.sh -buildfile test.xml - I have tried this same test using both the property form of url and by just specifying the url in the invoke command directly with no difference in results.
I was going to attempt to disable javascript using the webtest enable javascript command to see if that made a difference.
test script:
<project name="myTest" basedir="." default="wt.full">
<property name="webtest.home" location="/Users/spike/imm/webtest/" />
<property name="url" value="
http://sitename.internal.devserver/" />
<import file="${webtest.home}/webtest.xml"/>
<target name="wt.testInWork">
<webtest name="myTest">
<steps>
<invoke
description="Open Landing Page"
url="${url}" />
</steps>
</webtest>
</target>
</project>
(*script and commands have been filtered due to NDA requirements)