[Webtest] correct usage of followFrame

Richard Berens webtest@lists.canoo.com
Tue, 11 Jul 2006 20:26:49 -0700


This is a multi-part message in MIME format.

------=_NextPart_000_00AB_01C6A528.56FD6600
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

I am trying to test an application where one of the pages contains an
iframe. I use followFrame and then set various text fields, radio buttons,
and checkboxes. This seems to all work fine. The page is submitted in steps.
There is a button on the main page whose onclick handler submits the iframe.
The result of the iframe submission then invokes a submit on the form for
the main page.

 

To get to the submit button after setting the iframe fields, I use
<followFrame name="_top" />. I set a select and then use <clickButton .. ./>
on the appropriate button. All is fine; however what is submitted from the
iframe is a series of input items that contain no content. In particular
they do not contain the data that was set after the <followFrame . /> to the
iframe.

 

I am assuming that I am doing something wrong but I haven't a clue what. Can
anybody shed any light? I am using R_1353.

 

In a similar vein, I have seen mention that the combination of webtest and
htmlunit I am using supports ajax interaction. Are there any examples of how
this is done?

 

Thanks

 

Richard Berens


------=_NextPart_000_00AB_01C6A528.56FD6600
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"City"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:Arial;
	color:black;
	font-weight:normal;
	font-style:normal;
	text-decoration:none none;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 color=3Dblack face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:black'>I am trying to test an application =
where
one of the pages contains an iframe. I use followFrame and then set =
various
text fields, radio buttons, and checkboxes. This seems to all work fine. =
The
page is submitted in steps. There is a button on the main page whose =
onclick
handler submits the iframe. The result of the iframe submission then =
invokes a
submit on the form for the main page.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblack face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:black'><o:p>&nbsp;</o:p></span></font></p>=


<p class=3DMsoNormal><font size=3D2 color=3Dblack face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:black'>To get to the submit button after =
setting
the iframe fields, I use &lt;followFrame name=3D&#8221;_top&#8221; =
/&gt;. I set a
select and then use &lt;clickButton .. ./&gt; on the appropriate button. =
All is
fine; however what is submitted from the iframe is a series of input =
items that
contain no content. In particular they do not contain the data that was =
set
after the &lt;followFrame &#8230; /&gt; to the =
iframe.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblack face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:black'><o:p>&nbsp;</o:p></span></font></p>=


<p class=3DMsoNormal><font size=3D2 color=3Dblack face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:black'>I am assuming that I am doing =
something
wrong but I haven&#8217;t a clue what. Can anybody shed any light? I am =
using R_1353.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblack face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:black'><o:p>&nbsp;</o:p></span></font></p>=


<p class=3DMsoNormal><font size=3D2 color=3Dblack face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:black'>In a similar vein, I have seen =
mention
that the combination of webtest and htmlunit I am using supports =
<st1:City
w:st=3D"on"><st1:place w:st=3D"on">ajax</st1:place></st1:City> =
interaction. Are
there any examples of how this is done?<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblack face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:black'><o:p>&nbsp;</o:p></span></font></p>=


<p class=3DMsoNormal><font size=3D2 color=3Dblack face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:black'>Thanks<o:p></o:p></span></font></p>=


<p class=3DMsoNormal><font size=3D2 color=3Dblack face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:black'><o:p>&nbsp;</o:p></span></font></p>=


<p class=3DMsoNormal><font size=3D2 color=3Dblack face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:black'>Richard =
Berens<o:p></o:p></span></font></p>

</div>

</body>

</html>

------=_NextPart_000_00AB_01C6A528.56FD6600--