Canoo Webtest + jquery 1.10.2 hangs

332 Views Asked by At

Has someone found a way to use Canoo Webtest on sites using jQuery 1.10.2?

Apparently the underlying htmlunit engine hangs in the browser testing section of jQuery...

Any hint appreciated.

Here's the error I get:

ERROR (com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter) - runtimeError: message=[The data necessary to complete this operation is not yet available.] sourceName=[http://localhost/XXX/js/extern/jquery.js] line=[4] lineSource=[null] lineOffset=[0]

2

There are 2 best solutions below

0
On

If your tests do not rely on Javascript to be executed (for example you are only testing basic functionality with webtest and do more granular tests manually or with selenium), you can simply deactivate JavaScript:

<enableJavaScript enable="false"/>

See [the webtest docs for details].1

0
On

Unfortunately no version of Canoo Webtest supports JQuery 1.10.2. Canoo is using HtmlUnit and if you look at their site the last version of JQuery they document supporting is 1.2.6 (http://htmlunit.sourceforge.net/)

I have attempted to upgrade Canoo to the latest version of HtmlUnit myself (requires java changes) but unfortunately it appears HtmlUnit needs to be updated first to include support.

As a workaround, I have had to exclude JQuery js if running Canoo tests (before launching Canoo a database property indicating we are kicking of canoo tests is set to true). As we only started introducing JQuery existing tests still work with the older Prototype.js library.

Saz