Update of /cvsroot/jwebunit/jWebUnit/test/net/sourceforge/jwebunit
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22812/test/net/sourceforge/jwebunit
Modified Files:
FramesAndWindowsTest.java
Log Message:
jw: add window navigation / assertion by title
Index: FramesAndWindowsTest.java
===================================================================
RCS file:
/cvsroot/jwebunit/jWebUnit/test/net/sourceforge/jwebunit/FramesAndWindowsTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** FramesAndWindowsTest.java 10 Jun 2004 02:39:26 -0000 1.7
--- FramesAndWindowsTest.java 28 Jul 2004 17:39:06 -0000 1.8
***************
*** 20,24 ****
"<a id=\"SetColorGreen\" href='nothing.html'
onClick=\"JavaScript:document.realform.color.value='green';return false;\">green</a>" +
"<a id=\"ChildPage1\" href=\"\"
onClick=\"JavaScript:window.open('ChildPage1.html', 'ChildPage1');\">green</a>" +
! "<a id=\"ChildPage2\">Child Page 2</a>\n");
defineWebPage("ChildPage1", "This is child 1");
defineWebPage("ChildPage2", "This is child 2");
--- 20,24 ----
"<a id=\"SetColorGreen\" href='nothing.html'
onClick=\"JavaScript:document.realform.color.value='green';return false;\">green</a>" +
"<a id=\"ChildPage1\" href=\"\"
onClick=\"JavaScript:window.open('ChildPage1.html', 'ChildPage1');\">green</a>" +
! "<a id=\"ChildPage2\" href=\"\"
onClick=\"JavaScript:window.open('ChildPage2.html',
'WindowNameForChilePage2');\">Child Page 2</a>\n");
defineWebPage("ChildPage1", "This is child 1");
defineWebPage("ChildPage2", "This is child 2");
***************
*** 61,64 ****
--- 61,75 ----
assertTextPresent("child 1");
}
+
+ public void testGotoWindowByTitle() {
+ gotoRootAndOpenChild("ChildPage2");
+ gotoWindowByTitle("ChildPage2");
+ assertTextPresent("child 2");
+ }
+
+ public void testAssertWindowWithTitle() throws Throwable {
+ gotoRootAndOpenChild("ChildPage2");
+ assertPassFail("assertWindowPresentWithTitle", new Object[]{"ChildPage2"},
new Object[]{"NoSuchTitle"});
+ }
public void testSwitchWindows() {
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Jwebunit-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development