Revision: 579
http://svn.sourceforge.net/jwebunit/?rev=579&view=rev
Author: henryju
Date: 2006-10-16 07:16:04 -0700 (Mon, 16 Oct 2006)
Log Message:
-----------
Continue to update some methods in WebTestCase.java (do not compile).
Modified Paths:
--------------
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/JWebUnitTester.java
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/WebTestCase.java
Modified:
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/JWebUnitTester.java
===================================================================
---
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/JWebUnitTester.java
2006-10-12 15:49:36 UTC (rev 578)
+++
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/JWebUnitTester.java
2006-10-16 14:16:04 UTC (rev 579)
@@ -681,22 +681,6 @@
// formElementName));
// }
//
- // /**
- // * Assert that an input text element with name
- // <code>formElementName</code>
- // * has the <code>expectedValue</code> value.
- // *
- // * @param formElementName
- // * the value of the name attribute of the element
- // * @param expectedValue
- // * the expected value of the given input element
- // */
- // public void assertTextFieldEquals(String formElementName,
- // String expectedValue) {
- // assertFormElementPresent(formElementName);
- // Assert.assertEquals(expectedValue, getDialog().getTextFieldValue(
- // formElementName));
- // }
//
// /**
// * Assert that an input hidden element with name
Modified:
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/WebTestCase.java
===================================================================
--- trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/WebTestCase.java
2006-10-12 15:49:36 UTC (rev 578)
+++ trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/WebTestCase.java
2006-10-16 14:16:04 UTC (rev 579)
@@ -23,9 +23,11 @@
import net.sourceforge.jwebunit.locator.HtmlElementLocator;
import net.sourceforge.jwebunit.locator.HtmlFormLocator;
import net.sourceforge.jwebunit.locator.HtmlFormLocatorByName;
+import net.sourceforge.jwebunit.locator.HtmlHiddenInputLocator;
import net.sourceforge.jwebunit.locator.HtmlTableLocator;
import net.sourceforge.jwebunit.locator.HtmlTableLocatorByName;
import net.sourceforge.jwebunit.locator.HtmlTableLocatorBySummary;
+import net.sourceforge.jwebunit.locator.HtmlTextInputLocatorByName;
import junit.framework.TestCase;
@@ -1301,9 +1303,22 @@
//FIXME
}
+ /**
+ * @deprecated
+ */
public void assertTextFieldEquals(String formElementName,
String expectedValue) {
- getTester().assertTextFieldEquals(formElementName, expectedValue);
+ //input text
+ try {
+ getTester().assertAttributEquals(new
HtmlTextInputLocatorByName(formElementName), "value", expectedValue);
+ } catch (ElementNotFoundException e) {
+ //password input
+ //FIXME
+ } catch (AssertEqualsException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ fail();
+ }
}
public void assertHiddenFieldPresent(String formElementName,
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development