[Webtest] FW: Iframes support in webtest

Vimal Raj webtest@lists.canoo.com
Fri, 24 Sep 2004 10:46:46 -0700


This is a multi-part message in MIME format.

------_=_NextPart_001_01C4A25E.75DA33B5
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Marc.

Thanks for your response. I have created a sample test iframe.war file =
for you to exercise my problem to test Iframes.

In this example i have used 2 html files. IframeMain.html is the entry =
page which includes a Iframe( name:ichild), second one is the iframe =
page (child.html). It's fairly simple to understand by looking at the =
code sample.=20

 Following are the files i used to test this on a jboss environment. I =
have also attached 3 result pages to verify the behaviour of each step. =
By looking at result file "Parent LINK1096047123669.html" you can tell =
that step <clicklink> "goto Parent" doesn't take the user to the =
IframeMain.html page. The focus still remains inside the iframe.=20

Your help is really appreciated and based on your feedback we have a =
make decision to use webtest.

Thanks,
Vimal.

=20
IframeMain.html
--------------
<html>

 <title> Iframes test- Main Page </title>
  <body>=20
	<h1> parent frame </h1>
        <form name=3D"childform" id=3D"childform" >
          <IFrame id=3D"ichild" name=3D"ichild" src=3D"child.html" =
scrolling=3D"no" frameborder=3D"1"></IFrame>
       </form>
  </body>

</html>

child.html
-------------
<html>
  <script>=20
     //Purpose to submit the parent form and go back to the main page=20
     function submitParentView(sFormName)
     {
        var elForm =3D parent.document.getElementById(sFormName);
        if (elForm)
        {
          =20
           //submit the folderview request
           elForm.action =3D "IframeMain.html";
           elForm.submit();
        }
     }
  </script>
  <body>=20
	<h1> child Iframe </h1>     =20
      <a href=3D"javascript:submitParentView('childform')"> goto Parent =
</a>    =09
  </body>
</html>

iframestest.xml
---------------
<project name=3D"SimpleTest" basedir=3D"." default=3D"main">
   <taskdef file=3D"C:/canoo/457/webtestTaskdefs.properties">
      <classpath>
         <fileset dir=3D"C:/canoo/457/" includes=3D"**/lib/*.jar"/>
      </classpath>
   </taskdef>

   <target name=3D"main">
      <testSpec name=3D"myTest">
         <config=20
            host=3D"vraj"
            port=3D"8080"
            protocol=3D"http"
            basepath=3D"iframe1" />
         <steps>

		<invoke stepid=3D"Get Iframe tets main page" url=3D"IframeMain.html"=20
					save=3D"IFrame main page"/>
		<verifytitle
    			stepid=3D"Iframes test- Main Page"
    			text=3D"Iframes test- Main Page" />   =20
=20
            <followframe stepid=3D"get into the child iframe"
          				 name=3D"ichild"
          				 save=3D"Inside ichild Frame"/>           =20
            <verifytext=20
               stepid=3D"we should see the child Iframe text"
               text=3D"child Iframe" />

            <clicklink=20
		 		stepid=3D"CLICK goto Parent LINK"
         		label=3D"goto Parent"
         		save=3D"back to IFrame main page"/>

         </steps>
      </testSpec>
   </target>
</project>





-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com]On Behalf Of Marc Guillemot
Sent: Friday, September 24, 2004 12:28 AM
To: webtest@lists.canoo.com
Subject: Re: [Webtest] FW: Iframes support in webtest


Hi,

Can you prepare a sample script and set of simple html pages to =
illustrate the problem?

Marc.

Dierk Koenig wrote:
> forwarded
> -----Original Message-----
> *From:* Vimal Raj [mailto:vraj@convera.com]
> *Sent:* Donnerstag, 23. September 2004 21:21
> *To:* dierk.koenig@canoo.com
> *Subject:* Iframes support in webtest
>=20
>=20
>=20
>=20
> Hi Dierk,
>=20
>      Recently, I have started using canoo webtest to test my web=20
> application. I use Iframes in my pages so, i used <followframe> step =
to=20
> follow from parent frame (e.g. foo) to child Iframe (e.g. child). This =

> works fine but fails if i use the same step to go back to the parent =
frame.
>=20
>   I can not continue with my test scripts without resolving this=20
> problem. Your help is very much appreciated.
> Thanks you.
> - vim
>  -----Original Message-----
> *From:  * Vimal Raj=20
> *Sent:  * Thursday, September 23, 2004 11:31 AM
> *To:    * 'dierk.koenig@canoo.com'
> *Cc:    * Vimal Raj
> *Subject:       * Subscription
>=20
>=20
>   Hi Dierk,
>=20
>       This morning i have subscribed to the WebTest. At the end of the =

> subscribing process a message read that i will recieve an email with =
the=20
> subcription details to log in next time to post my questions but so =
far=20
> i haven't recieved any.
>=20
> I would really appreciate if you could check this for me.
> Thanks,
> Vimal.

_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest

------_=_NextPart_001_01C4A25E.75DA33B5
Content-Type: application/octet-stream;
	name="iframe.war"
Content-Transfer-Encoding: base64
Content-Description: iframe.war
Content-Disposition: attachment;
	filename="iframe.war"

UEsDBBQACAAIAKdSODEAAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAA
AAAAAFBLAwQUAAgACACnUjgxAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803M
y0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAmY6BnFG5gqaASX5in4ZiYX5RdXFpek5hYr
eOYl62nycvFyAQBQSwcIIomVb0cAAABHAAAAUEsDBBQACAAIALFNODEAAAAAAAAAAAAAAAAKAAAA
Y2hpbGQuaHRtbG2SsW6DMBCG50TKO5xYAguoawMMlVopQ6pM3R18Dq4AE9sQoarv3jN2BVHrxXf2
7+/+O8hr2zblbguQm0rL3pbgElpZdh50rwyCVWCGSystMOjwDoaNCMYqjRxuA+opvBBDV1mpuqA+
M42d/ZB4j82b0u07azEJ0q+w0xqZBmycAAro5zcpV9XQuuCK9rVBF75MR77iHBaAFBB7QLIcrgrQ
ekiyLHRjawShGo56JJOgkZox9kHruSnzfRUQHYWm8icmu9RNLjr8J/f8eG3yO4Tznmdh1nNyUXxy
U99tN3n9VEJVy4aDL0RSOvrFLLicQa1RFNEnG5mHPf+Z+n4mCXK0T6ISroo+pL8mLAvUjTc0m3Ae
qKD/I34AUEsHCI6Ot4oZAQAAGgIAAFBLAwQUAAgACAD7UTgxAAAAAAAAAAAAAAAADwAAAElmcmFt
ZU1haW4uaHRtbFWQMQ7DIAxF50bKHSz2FmV3GCtlqJQrkEASJAKVw9Lb10CqtmzfvG/7G7e0e9U2
bQOYXPJWwbCQ3u0ByR7pCg/tAox6tYCyAowCTtG8FLTNBbdOw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A25E.75DA33B5
Content-Type: text/html;
	name="Inside ichild Frame1096047222153.html"
Content-Transfer-Encoding: base64
Content-Description: Inside ichild Frame1096047222153.html
Content-Disposition: attachment;
	filename="Inside ichild Frame1096047222153.html"

PGh0bWw+DQogIDxzY3JpcHQ+IA0KICAgICAvL1B1cnBvc2UgdG8gc3VibWl0IGEgbmV3IHNhdmUg
c3RvcmVkIHF1ZXJ5DQogICAgIGZ1bmN0aW9uIHN1Ym1pdFBhcmVudFZpZXcoc0Zvcm1OYW1lKQ0K
ICAgICB7DQogICAgICAgIHZhciBlbEZvcm0gPSBwYXJlbnQuZG9jdW1lbnQuZ2V0RWxlbWVudEJ5
SWQoc0Zvcm1OYW1lKTsNCiAgICAgICAgaWYgKGVsRm9ybSkNCiAgICAgICAgew0KICAgICAgICAg
ICANCiAgICAgICAgICAgLy9zdWJtaXQgdGhlIGZvbGRlcnZpZXcgcmVxdWVzdA0KICAgICAgICAg
ICBlbEZvcm0uYWN0aW9uID0gIklmcmFtZU1haW4uaHRtbCI7DQogICAgICAgICAgIGVsRm9ybS5z
dWJtaXQoKTsNCiAgICAgICAgfQ0KICAgICB9DQogIDwvc2NyaXB0Pg0KICA8Ym9keT4gDQoNCgk8
aDE+IGNoaWxkIElmcmFtZSA8L2gxPg0KICAgICAgDQogICAgICAgIDxhIGhyZWY9ImphdmFzY3Jp
cHQ6c3VibWl0UGFyZW50VmlldygnY2hpbGRmb3JtJykiPiBnb3RvIFBhcmVudCA8L2E+DQogICAg
CQ0KICA8L2JvZHk+DQoNCjwvaHRtbD4NCg==

------_=_NextPart_001_01C4A25E.75DA33B5
Content-Type: text/html;
	name="back to IFrame main page1096047222231.html"
Content-Transfer-Encoding: base64
Content-Description: back to IFrame main page1096047222231.html
Content-Disposition: attachment;
	filename="back to IFrame main page1096047222231.html"

PGh0bWw+DQogIDxzY3JpcHQ+IA0KICAgICAvL1B1cnBvc2UgdG8gc3VibWl0IGEgbmV3IHNhdmUg
c3RvcmVkIHF1ZXJ5DQogICAgIGZ1bmN0aW9uIHN1Ym1pdFBhcmVudFZpZXcoc0Zvcm1OYW1lKQ0K
ICAgICB7DQogICAgICAgIHZhciBlbEZvcm0gPSBwYXJlbnQuZG9jdW1lbnQuZ2V0RWxlbWVudEJ5
SWQoc0Zvcm1OYW1lKTsNCiAgICAgICAgaWYgKGVsRm9ybSkNCiAgICAgICAgew0KICAgICAgICAg
ICANCiAgICAgICAgICAgLy9zdWJtaXQgdGhlIGZvbGRlcnZpZXcgcmVxdWVzdA0KICAgICAgICAg
ICBlbEZvcm0uYWN0aW9uID0gIklmcmFtZU1haW4uaHRtbCI7DQogICAgICAgICAgIGVsRm9ybS5z
dWJtaXQoKTsNCiAgICAgICAgfQ0KICAgICB9DQogIDwvc2NyaXB0Pg0KICA8Ym9keT4gDQoNCgk8
aDE+IGNoaWxkIElmcmFtZSA8L2gxPg0KICAgICAgDQogICAgICAgIDxhIGhyZWY9ImphdmFzY3Jp
cHQ6c3VibWl0UGFyZW50VmlldygnY2hpbGRmb3JtJykiPiBnb3RvIFBhcmVudCA8L2E+DQogICAg
CQ0KICA8L2JvZHk+DQoNCjwvaHRtbD4NCg==

------_=_NextPart_001_01C4A25E.75DA33B5
Content-Type: text/html;
	name="IFrame main page1096047222137.html"
Content-Transfer-Encoding: base64
Content-Description: IFrame main page1096047222137.html
Content-Disposition: attachment;
	filename="IFrame main page1096047222137.html"

PGh0bWw+DQoNCiA8dGl0bGU+IElmcmFtZXMgdGVzdC0gTWFpbiBQYWdlIDwvdGl0bGU+DQogIDxi
b2R5PiANCgk8aDE+IHBhcmVudCBmcmFtZSA8L2gxPg0KICAgICAgICA8Zm9ybSBuYW1lPSJjaGls
ZGZvcm0iIGlkPSJjaGlsZGZvcm0iID4NCiAgICAgICAgICA8SUZyYW1lIGlkPSJpY2hpbGQiIG5h
bWU9ImljaGlsZCIgc3JjPSJjaGlsZC5odG1sIiBzY3JvbGxpbmc9Im5vIiBmcmFtZWJvcmRlcj0i
MSI+PC9JRnJhbWU+DQogICAgICAgPC9mb3JtPg0KICA8L2JvZHk+DQoNCjwvaHRtbD4NCg==

------_=_NextPart_001_01C4A25E.75DA33B5--