[Webtest] FW: Iframes support in webtest

Vimal Raj webtest@lists.canoo.com
Fri, 24 Sep 2004 16:11:40 -0700


Hi All,

   Never mind. It was my mistake, I didn't close one of the <a> in my =
html file. =20

   Now things are working as expected. Thank you all so much for your =
help.=20

- Vimal.

-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com]On Behalf Of Vimal Raj
Sent: Friday, September 24, 2004 10:47 AM
To: webtest@lists.canoo.com
Subject: RE: [Webtest] FW: Iframes support in webtest


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