Revision: 706
http://svn.sourceforge.net/jwebunit/?rev=706&view=rev
Author: henryju
Date: 2007-05-05 14:59:26 -0700 (Sat, 05 May 2007)
Log Message:
-----------
[Issue 1706395] getPageSource() now returns source of the current frame or
window.
Modified Paths:
--------------
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java
trunk/src/changes/changes.xml
Modified:
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java
===================================================================
---
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java
2007-05-05 21:53:59 UTC (rev 705)
+++
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java
2007-05-05 21:59:26 UTC (rev 706)
@@ -111,6 +111,14 @@
assertException(RuntimeException.class, "gotoFrame",
new Object[] { "BottomFrame" });
}
+
+ public void testGetFrameSource() {
+ beginAt("Frames.html");
+ assertTrue(getPageSource().indexOf("<frameset rows=\"33%, 33%,
33%\">")>=0);
+ gotoFrame("TopFrame");
+ assertEquals("<html><body>TopFrame</body></html>", getPageSource());
+ assertTextPresent("TopFrame");
+ }
public void testGotoFrameById() {
beginAt("Frames.html");
Modified:
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java
===================================================================
---
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java
2007-05-05 21:53:59 UTC (rev 705)
+++
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java
2007-05-05 21:59:26 UTC (rev 706)
@@ -551,7 +551,7 @@
}
public String getPageSource() {
- return wc.getCurrentWindow().getEnclosedPage().getWebResponse()
+ return win.getEnclosedPage().getWebResponse()
.getContentAsString();
}
Modified: trunk/src/changes/changes.xml
===================================================================
--- trunk/src/changes/changes.xml 2007-05-05 21:53:59 UTC (rev 705)
+++ trunk/src/changes/changes.xml 2007-05-05 21:59:26 UTC (rev 706)
@@ -16,6 +16,9 @@
</action>
</release>
<release version="1.4.1" date="may 5, 2007">
+ <action type="fix" dev="Julien Henry" issue="1706395"
due-to="meilon">
+ getPageSource() now returns source of the current frame or
window.
+ </action>
<action type="fix" dev="Julien Henry"
issue="1708229,1710809,1712633" due-to="Jon,Joe Fisher">
setTextField now doesn't change the current working form if
already set.
clickRadioOption now doesn't change the current working form
if already set.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
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-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development