Author: fjuma
Date: 2009-04-16 13:51:50 -0400 (Thu, 16 Apr 2009)
New Revision: 298
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
Log:
Modified the enableOrDisableFormInput() method in EmbjoprTestCase.java.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2009-04-16
17:45:33 UTC (rev 297)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2009-04-16
17:51:50 UTC (rev 298)
@@ -301,7 +301,7 @@
HtmlInput input = enableOrDisableFormInput(propertyName,
Boolean.TRUE);
- //assertFalse("Could not enable: " + propertyName,
input.isDisabled());
+ assertFalse("Could not enable: " + propertyName,
input.isDisabled());
setFormInput(input, properties.get(propertyName));
}
@@ -400,7 +400,17 @@
HtmlInput checkBox = (HtmlInput)form.getFirstByXPath(xpath);
if(checkBox != null) {
- checkBox.setChecked(!enableInput);
+ //checkBox.setChecked(!enableInput);
+
+ boolean isChecked = checkBox.isChecked();
+
+ if(isChecked == enableInput) {
+ try {
+ checkBox.click();
+ } catch (Exception e) {
+ log.error("Could not click on the checkbox for: " +
propertyName);
+ }
+ }
}
return input;
Show replies by date