7 messages in com.canoo.lists.webtestRe: [Webtest] Problem with FollowFram...
FromSent OnAttachments
Koorosh Vakhshoori21 Jan 2005 19:48 
Marc Guillemot25 Jan 2005 01:16 
Koorosh Vakhshoori25 Jan 2005 11:47 
Koorosh Vakhshoori25 Jan 2005 17:56 
Marc Guillemot26 Jan 2005 05:53 
Marc Guillemot26 Jan 2005 06:15 
Koorosh Vakhshoori26 Jan 2005 09:41 
Subject:Re: [Webtest] Problem with FollowFrame tag.
From:Koorosh Vakhshoori (Koor@synopsys.com)
Date:01/25/2005 11:47:35 AM
List:com.canoo.lists.webtest

Hi Marc,

I believe I have identified the source of the problem. Now I am not sure if this is considered a bug in HTMLUNIT or not? Here it goes:

I have a HTML page as follows:

<HEAD> <TITLE>Bad Frame</TITLE> </HEAD> <FRAMESET ROWS="22%,78%"> <FRAME NAME="top_part" SRC="cgiservlet/azar/cgi-bin/ASP/dow/dow_retrieve_top.cgi"> <FRAME NAME="bottom_part" SRC="k2.html"> </FRAMESET> </HTML>

The top_part references to a CGI that generates an HTML page where it has some Javascript in it. The issue is in Javascript code, since it reset the window name to 'root_window' using the following command:

window.name = 'root_window';

As the result, the Frame name was changed from 'top_part' to 'root_window'. Now when Webtest executes the 'followframe' step as indicated bellow:

<invoke stepid="goto doc" save="restrictedDoc" url="${frame.html}" /> <followframe stepid="Get the top window in frame." name="top_part" save="top_doc" />

It can not find the 'top_part' since its name was changed. Hope this makes sense.

Now to duplicate the problem, just have a subframe execute a JavaScript command that renames the window, and then try to use followframe to locate it in WebTest.

Take care, Koorosh