Hi,
Here is the kind of information I need to be able to reproduce quickly your
problem:
Java Code :
public class MyTest extends WebTestCase {
public void testFrame() {
URL page1 = this.getClass().getResource("/Page1.html");
beginAt(page1.toExternalForm());
assertTitleEquals("Page 1");
gotoFrame("frame1");
assertTitleEquals("Page 2");
setWorkingForm("FrmEdit");
System.out.println(getPageSource());
}
}
Minimal HTML Code :
Page1.html
<html>
<head>
<title>Page 1</title>
</head>
<frameset>
<frame name="frame1" src="Page2.html">
</frameset>
</html>
Page2.html
<html>
<head>
<title>Page 2</title>
</head>
<body>
<form name="FrmEdit">
</form>
toto
</body>
</html>
This test works fine (no problem with setWorkingForm), but your are right,
getPageSource always returns source from the root frame. Please fill a bug on
sourceforge, I will fix it ASAP.
++
Julien
----- Message d'origine ----
De : Christian Arnold <[EMAIL PROTECTED]>
À : Usage problems for JWebUnit <[email protected]>
Envoyé le : Lundi, 23 Avril 2007, 14h49mn 20s
Objet : Re: [JWebUnit-users] Re : Get page source from frames
Hello,
yes, I use the latest JWebUnit 1.4. What code do you need? I think I
have written alle the code needed. In fact, no code is needed, I need
the code to view frame contents.
Best Regards
Christian
Julien HENRY schrieb:
> Hi,
>
> Are you using the latest release of JWebUnit (1.4)?
>
> Could you please provide HTML code.
>
> Thanks.
>
> ++
>
> Julien
>
> ----- Message d'origine ----
> De : Christian Arnold <[EMAIL PROTECTED]>
> À : [email protected]
> Envoyé le : Lundi, 23 Avril 2007, 11h12mn 21s
> Objet : [JWebUnit-users] Get page source from frames
>
> Hello!
>
> I have to test a website build on frames. I tried
>
> gotoFrame("main_frame");
> setWorkingForm("FrmEdit");
>
> But the setWorkingForm throws UnableToSetFormException: Attempted to set
> form to null.
>
> But this form has to be present. Now I want to see the page source of
> that frame to check this, but how can I get it?
>
> System.out.println(getPageSource());
>
> only shows me the source of the main document, not of the as active set
> frame.
>
> Best Regards
> Christian Arnold
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users
___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur
Yahoo! Questions/Réponses
http://fr.answers.yahoo.com
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users