[Webtest] A new aspect on 'Cannot read property "forms" from
undefined ... '?
Marc Guillemot
Marc Guillemot <mguillemot@yahoo.fr>
Mon, 16 Jun 2008 09:48:22 +0200
Georg,
if you don't get this js problem in a "normal" browser, then it
indicates a problem in HtmlUnit. To be sure that it still exists, you
should first try with the latest snapshot of HtmlUnit 2.2.
Cheers,
Marc.
--
Blog: http://mguillem.wordpress.com
Georg1729 wrote:
> Hi folks,
>
> my test
>
> 1) clicks on a <input type="button"> for creating a new business object,
> 2) dives into an embedded IFrame via "followFrame",
> 3) fills in some data into a form,
> 4) returns from the IFrame (goes a step up in the frame-tree),
> 5) and finally clicks on another <input type="button"> for saving the
> business object into a DB.
>
> Well, at least thats what it SHOULD do, because step 5) raises some error of
> the kind
>
> Cannot read property "forms" from undefined (some javascript file)
>
> I browsed the forum and found issues on the very type of error and also
> issues on returning
> from an IFrame. But I didn't find posts relating the two ...
>
> The error does not occur if I skip the steps 2),3),4), which makes me think
> that the dive/return
> from the IFrame somehow shredders some internal data structure.
>
> I know that I can turn off JS-Error reportings via the
> ThrowExceptionOnScriptError option
> (in this scenario the test runs smoothly, but its not functioning, i.e., the
> object doesnt
> get saved into a DB), so this isnt of much help.
>
> My guess is that HtmlUnit still has problems with IFrames. Anyone knows
> better?
>
> Greetings, Georg