[Webtest] [webtest][JIRA] Closed: (WT-451) Upgrade to htmlunit 2.2

Kai Mütz Kai Mütz
Wed, 13 Aug 2008 16:43:41 +0200

webtest-admin@lists.canoo.com <> wrote:
> Hi,
> [back from vacation]
> I'm sorry that some regression has been introduced in HtmlUnit-2.2
> despite the high test coverage of HtmlUnit itself as well of different
> projects using HtmlUnit (WebTest of course, but JSFUnit, JWebUnit and
> WebDriver).
> Can you provide a (simple) example allowing to identify the
> regression introduced with HtmlUnit-2.2?

Currently I can not provide a simple example but can try tu explain our

We have a webapplication running in an frameset with a header, a left and a
main frame. When a page is loaded in the main frame onload event executes a
JS function located in the left frame in order to update the content of the
left frame. The JS function is something like:

function loaded(document) {
    if (0 == parent.frames.length) {
    if (parent.left) {

If webtest invokes one of these pages (with <invoke/> step) it is loaded
into the entire window not into the main frame (correct me if I am wrong).
Thus no frameset exists, thus no "left" frame exists. In this case webtest
R_1714 throws an error:

TypeError: Cannot find function loadHistory in object [object]

This is strange bacause the JS checks if a left frame exists. This error
does not occur in R_1713, Firefox 2 and 3, IE 6 and 7.

I think it is a HtmlUnit-2.2 issue.