[Webtest] Re: TR: Help testing frames in different windows.

Marc Guillemot webtest@lists.canoo.com
Fri, 24 Sep 2004 10:33:43 +0200


It's due to the way followframe currently works. It looks for the frame starting at the main window. followframe should 
be improved with an attribute "relative" (or something like that) to allow following a frame from the current response. 
I use for my own needs a special version of followframe doing only this. I will commit this feature in the standard 
followframe as soon as possible.

Marc.

Fabien TISON wrote:
> Hi,
>  
> I 'm trying  to test a frame, in a new window, created by a link with 
> target="_top".
>  
> I received the following error :
>  BUILD FAILED
>  Test step followframe named "Selectionne la frame recherche produit" 
> failed with message "Step "followframe" Selectionne la frame recherche 
> produit" (12/14) Frame not found with name: recherche available: 
> [mbanner, liste, _new, edientete, menu, _top]"
>  
> Complete descrition of the case at the end of the message.
>  
> I wonder if it's possible to follow a frame in another window (maybe a 
> HttpUnit limitation) ?
> If not, how can I contribute to make it possible ?
>  
> Best regards
> Fabien TISON
> Java Development
> http://www.generix.fr
>  
> Test case :
> -----------
>  
> Frame structure of the main page :
> +------------------------+
> | mbanner          <link>|
> +----+-------------------+
> |menu| edientete         |
> |    |                   |
> |    +-------------------+
> |    | liste             |
> |    |                   |
> |    |                   |
> |    |                   |
> +----+-------------------+
>  
> In the "mbanner" frame I use the "clickbutton" to submit a form.
> This form has a "target" attribut with the "_top" value, so that there 
> is a new window for the next page.
>  
> This new window has the following frame structure :
> +-----------------------------+
> | banner                <link>|
> +---------+-------------------+
> |recherche| option            |
> |         |                   |
> |         |                   |
> |         +-------------------+
> |         | liste             |
> |         |                   |
> |         |                   |
> +---------+-------------------+
>  
> Unfortunately, I don't succeed to make tests for the "recherche" frame.
>  
> I receive the following error :
>  BUILD FAILED
>  Test step followframe named "Selectionne la frame recherche produit" 
> failed with message "Step "followframe" Selectionne la frame recherche 
> produit" (12/14) Frame not found with name: recherche available: 
> [mbanner, liste, _new, edientete, menu, _top]"
>  
> I tried "_top:recherche" as a parameter of folowframe but same error.
>  
> TestCase.xml :
>    <target name="main">
>       <testSpec name="1er test">
>          <config
>          autorefresh="true"
>      saveresponse="true"
>        summary="true"
>        showhtmlparseroutput="true"
>        resultpath="${resultpath}"
>        resultfile="${resultfile}"
>           host="localhost"
>           port="8888"
>           protocol="http"
>           basepath="egx500ES1/btoe" />
>          <steps>
>             <invoke
>                stepid="Appel de la page d'accueil"
>                
> url="ServletControl?sourceview=I_MENU&amp;cinematic=forward(0)&amp;entity=1" 
> />
>             <verifytitle
>                stepid="Vérification du titre de la fenetre"
>                text="GENERIX Collaborative Entreprise - Identification" />
>            <setinputfield stepid="Saisie Entité"
>              name="chp:ENTITY"
>              value="1" />
>            <setinputfield stepid="Saisie User"
>              name="chp:USER"
>              value="xxxxx" />
>          <setinputfield stepid="Saisie password"
>              name="chp:PASSWORD"
>              value="xxxxx" />
>          <clickbutton stepid="Bouton Envoyer"
>              name="validation" />
>  <verifytitle
>                stepid="Vérification du titre de la fenetre après login"
>                text="Groupe (multi-entites) - RDEMOC" />
>  
>  <followframe stepid="Selectionne la frame du haut"
>           name="mbanner"/>
>          
>  <setinputfield stepid="Saisie fonction et lance"
>              name="chp:Fct"
>              value="I_PRO_F" />
>          <clickbutton stepid="Bouton Lancer"
>              label="Lancer" />      
>              
>               <followframe stepid="Selectionne la frame recherche produit"
>           name="recherche"/>
> <verifyselectfield
>                stepid="Vérification du contenu liste déroulante etat"
>                name="cinematic"
>                text="Tous les articles" />
>          </steps>
>       </testSpec>
>    </target>