Revision: 722
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=722&view=rev
Author: henryju
Date: 2008-04-14 05:32:53 -0700 (Mon, 14 Apr 2008)
Log Message:
-----------
[1747033] assertCheckbox[Not]Present now works if HTML type attribute value is
not lowercase (e.g.: type="CHECKBOX").
Modified Paths:
--------------
trunk/jwebunit-commons-tests/src/main/resources/testcases/FormSubmissionTest/SingleNamedButtonForm.html
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java
trunk/src/changes/changes.xml
Modified:
trunk/jwebunit-commons-tests/src/main/resources/testcases/FormSubmissionTest/SingleNamedButtonForm.html
===================================================================
---
trunk/jwebunit-commons-tests/src/main/resources/testcases/FormSubmissionTest/SingleNamedButtonForm.html
2008-04-14 10:17:37 UTC (rev 721)
+++
trunk/jwebunit-commons-tests/src/main/resources/testcases/FormSubmissionTest/SingleNamedButtonForm.html
2008-04-14 12:32:53 UTC (rev 722)
@@ -4,7 +4,7 @@
<form method="get" action="../params.jsp">
<input type="text" name="color" />
<input type="hidden" name="checkBox"/>
- <input type="checkbox" name="checkBox" />
+ <input type="CHECKBOX" name="checkBox" />
<input type="submit" name="button" value="click me">
<input type="hidden" name="myReferer"
value="FormSubmissionTest/SingleNamedButtonForm.html">
</form>
Modified:
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java
===================================================================
---
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java
2008-04-14 10:17:37 UTC (rev 721)
+++
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java
2008-04-14 12:32:53 UTC (rev 722)
@@ -731,7 +731,7 @@
assertFormPresent();
Assert.assertTrue("Did not find form checkbox with name ["
+ checkboxName + "].", getTestingEngine().hasElementByXPath(
- "//[EMAIL PROTECTED]'checkbox' and @name='" + checkboxName +
"']"));
+ "//input[lower-case(@type)='checkbox' and @name='" +
checkboxName + "']"));
}
/**
@@ -745,7 +745,7 @@
Assert.assertTrue("Did not find form checkbox with name ["
+ checkboxName + "] and value [" + checkboxValue + "].",
getTestingEngine().hasElementByXPath(
- "//[EMAIL PROTECTED]'checkbox' and @name='" +
checkboxName
+ "//input[lower-case(@type)='checkbox' and @name='" +
checkboxName
+ "' and @value='" + checkboxValue + "']"));
}
@@ -758,7 +758,7 @@
assertFormPresent();
Assert.assertFalse("Found form checkbox with name [" + checkboxName
+ "] when not expected.", getTestingEngine().hasElementByXPath(
- "//[EMAIL PROTECTED]'checkbox' and @name='" + checkboxName +
"']"));
+ "//input[lower-case(@type)='checkbox' and @name='" +
checkboxName + "']"));
}
/**
@@ -773,7 +773,7 @@
Assert.assertFalse("Found form checkbox with name [" + checkboxName
+ "] and value [" + checkboxValue + "] when not expected.",
getTestingEngine().hasElementByXPath(
- "//[EMAIL PROTECTED]'checkbox' and @name='" +
checkboxName
+ "//input[lower-case(@type)='checkbox' and @name='" +
checkboxName
+ "' and @value='" + checkboxValue + "']"));
}
Modified: trunk/src/changes/changes.xml
===================================================================
--- trunk/src/changes/changes.xml 2008-04-14 10:17:37 UTC (rev 721)
+++ trunk/src/changes/changes.xml 2008-04-14 12:32:53 UTC (rev 722)
@@ -7,7 +7,10 @@
</author>
</properties>
<body>
- <release version="1.5" date="UNKNOW">
+ <release version="1.5" date="UNKNOW" description="The latest major
release before Java 1.5 migration">
+ <action type="fix" dev="henryju" issue="1747033" due-to="Carlo
Possati">
+ assertCheckbox[Not]Present now works if HTML type attribute
value is not lowercase (e.g.: type="CHECKBOX").
+ </action>
<action type="update" dev="henryju">
Update to HtmlUnit 1.14.
</action>
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 the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development