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

Kai Mütz Kai Mütz"
Wed, 13 Aug 2008 16:53:22 +0200


------=_Part_64334_16914563.1218639202045
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

2008/8/13 Kai M=FCtz <kmuetz@googlemail.com>

> 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
> problem:
>
> 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 t=
he
> left frame. The JS function is something like:
>
> function loaded(document) {
>    if (0 =3D=3D parent.frames.length) {
>        return;
>    }
>    [....]
>    if (parent.left) {
>        [....]
>        parent.left.loadHistory();
>    }
> }
>
> 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 webtes=
t
> 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.
>
>
Considering other webtest errors with R_1714 yields me to the conclusion
that it must have something to do with the frame handling of HtmlUnit-2.2.

HTH, Kai

------=_Part_64334_16914563.1218639202045
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<div dir=3D"ltr">2008/8/13 Kai M=FCtz <span dir=3D"ltr">&lt;<a href=3D"mail=
to:kmuetz@googlemail.com">kmuetz@googlemail.com</a>&gt;</span><br><div clas=
s=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"border-left: 1=
px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"=
>
<div class=3D"Ih2E3d"><a href=3D"mailto:webtest-admin@lists.canoo.com">webt=
est-admin@lists.canoo.com</a> &lt;&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; [back from vacation]<br>
&gt;<br>
&gt; I&#39;m sorry that some regression has been introduced in HtmlUnit-2.2=
<br>
&gt; despite the high test coverage of HtmlUnit itself as well of different=
<br>
&gt; projects using HtmlUnit (WebTest of course, but JSFUnit, JWebUnit and<=
br>
&gt; WebDriver).<br>
&gt;<br>
&gt; Can you provide a (simple) example allowing to identify the<br>
&gt; regression introduced with HtmlUnit-2.2?<br>
<br>
</div>Currently I can not provide a simple example but can try tu explain o=
ur<br>
problem:<br>
<br>
We have a webapplication running in an frameset with a header, a left and a=
<br>
main frame. When a page is loaded in the main frame onload event executes a=
<br>
JS function located in the left frame in order to update the content of the=
<br>
left frame. The JS function is something like:<br>
<br>
function loaded(document) {<br>
 &nbsp; &nbsp;if (0 =3D=3D parent.frames.length) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp;return;<br>
 &nbsp; &nbsp;}<br>
 &nbsp; &nbsp;[....]<br>
 &nbsp; &nbsp;if (parent.left) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp;[....]<br>
 &nbsp; &nbsp; &nbsp; &nbsp;parent.left.loadHistory();<br>
 &nbsp; &nbsp;}<br>
}<br>
<br>
If webtest invokes one of these pages (with &lt;invoke/&gt; step) it is loa=
ded<br>
into the entire window not into the main frame (correct me if I am wrong).<=
br>
Thus no frameset exists, thus no &quot;left&quot; frame exists. In this cas=
e webtest<br>
R_1714 throws an error:<br>
<div class=3D"Ih2E3d"><br>
TypeError: Cannot find function loadHistory in object [object]<br>
<br>
</div>This is strange bacause the JS checks if a left frame exists. This er=
ror<br>
does not occur in R_1713, Firefox 2 and 3, IE 6 and 7.<br>
<br>
I think it is a HtmlUnit-2.2 issue.<br>
<font color=3D"#888888"><br></font></blockquote><div><br>Considering other =
webtest errors with&nbsp;R_1714 yields me to the conclusion that it must ha=
ve something to do with the frame handling of HtmlUnit-2.2.<br><br>HTH, Kai=
<br>
 </div></div><br></div>

------=_Part_64334_16914563.1218639202045--