Update of /cvsroot/jwebunit/jWebUnit/src/net/sourceforge/jwebunit/plugin/jacobie
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5552/src/net/sourceforge/jwebunit/plugin/jacobie

Modified Files:
      Tag: JACOBIE
        JacobieDialog.java 
Log Message:
more changes

Index: JacobieDialog.java
===================================================================
RCS file: 
/cvsroot/jwebunit/jWebUnit/src/net/sourceforge/jwebunit/plugin/jacobie/Attic/JacobieDialog.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** JacobieDialog.java  2 Dec 2004 20:17:44 -0000       1.1.2.1
--- JacobieDialog.java  11 Feb 2005 21:27:36 -0000      1.1.2.2
***************
*** 218,221 ****
--- 218,246 ----
      }
      
+     
+ //    public SubmitButton getSubmitButton(String buttonName) {
+ //        throw new UnsupportedOperationException("getSubmitButton");
+ //    }
+ 
+     public String getSubmitButtonValue(String buttonName) {
+         throw new UnsupportedOperationException("getSubmitButtonValue");
+     }
+ 
+     public boolean hasSubmitButton(String buttonName) {
+         boolean bReturn = false;
+         
+         return bReturn;
+     }
+ 
+ //    public Button getButton(String buttonId) {
+ //        throw new UnsupportedOperationException("getButton");
+ //    }
+ 
+     public boolean hasButton(String buttonId) {
+         throw new UnsupportedOperationException("hasButton");
+     }
+ 
+     
+     
         
        /**
***************
*** 278,282 ****
--- 303,417 ----
          return bReturn;
      }
+ 
      
+     public boolean isCheckboxSelected(String checkBoxName) {
+         boolean bReturn = false;
+         Document theDocument = getIe().getDocument();        
+         DefaultHTMLElement theDefaultHTMLElement = 
theDocument.getElementById(checkBoxName);
+         if(theDefaultHTMLElement != null) {
+             if(theDefaultHTMLElement.isChecked()) {
+                 bReturn = true;
+             }
+         }
+         return bReturn;
+     }
+ 
+     public boolean isCheckboxNotSelected(String checkBoxName) {
+         boolean bReturn = false;
+         Document theDocument = getIe().getDocument();        
+         DefaultHTMLElement theDefaultHTMLElement = 
theDocument.getElementById(checkBoxName);
+         if(theDefaultHTMLElement != null) {
+             if(!theDefaultHTMLElement.isChecked()) {
+                 bReturn = true;
+             }
+         }
+         return bReturn;
+     }
+ 
+     /**
+      * Select a specified checkbox.  If the checkbox is already checked then 
the checkbox
+      * will stay checked.
+      * @param checkBoxName name of checkbox to be deselected.
+      */
+     public void checkCheckbox(String checkBoxName) {
+         Document theDocument = getIe().getDocument();        
+         DefaultHTMLElement theDefaultHTMLElement = 
theDocument.getElementById(checkBoxName);
+         if(theDefaultHTMLElement != null) {
+             if(!theDefaultHTMLElement.isChecked()) {
+                 
+                 if(isHtmlElementFocusBlurEnabled()) {
+                     theDefaultHTMLElement.focus();
+                 }
+ 
+                 //theDefaultHTMLElement.setChecked(true);
+                 theDefaultHTMLElement.click();
+                 
+                 if(isHtmlElementFocusBlurEnabled()) {
+                     theDefaultHTMLElement.blur();
+                 }
+ 
+             }
+         }
+     }
+ 
+     public void checkCheckbox(String checkBoxName, String value) {
+         Document theDocument = getIe().getDocument();        
+         DefaultHTMLElement theDefaultHTMLElement = 
theDocument.getElementById(checkBoxName);
+         if(theDefaultHTMLElement != null) {
+             if(!theDefaultHTMLElement.isChecked()) {
+                 theDefaultHTMLElement.setChecked(true);
+                 
+                 //this may not be the best way to set the incoming value but 
for now this will work.
+                 theDefaultHTMLElement.setValue(value);
+             }
+             else {
+                 //this may not be the best way to set the incoming value but 
for now this will work.
+                 theDefaultHTMLElement.setValue(value);                
+             }
+         }
+     }
+ 
+     /**
+      * Deselect a specified checkbox.  If the checkbox is already unchecked 
then the checkbox
+      * will stay unchecked.
+      *
+      * @param checkBoxName name of checkbox to be deselected.
+      */
+     public void uncheckCheckbox(String checkBoxName) {
+         Document theDocument = getIe().getDocument();        
+         DefaultHTMLElement theDefaultHTMLElement = 
theDocument.getElementById(checkBoxName);
+         if(theDefaultHTMLElement != null) {
+             if(theDefaultHTMLElement.isChecked()) {
+                 //theDefaultHTMLElement.setChecked(false);
+                 if(isHtmlElementFocusBlurEnabled()) {
+                     theDefaultHTMLElement.focus();
+                 }
+ 
+                 theDefaultHTMLElement.click();
+                 
+                 if(isHtmlElementFocusBlurEnabled()) {
+                     theDefaultHTMLElement.blur();
+                 }
+ 
+             }
+         }
+     }
+ 
+     public void uncheckCheckbox(String checkBoxName, String value) {
+         Document theDocument = getIe().getDocument();        
+         DefaultHTMLElement theDefaultHTMLElement = 
theDocument.getElementById(checkBoxName);
+         if(theDefaultHTMLElement != null) {
+             if(theDefaultHTMLElement.isChecked()) {
+                 theDefaultHTMLElement.setChecked(false);
+                 
+                 //this may not be the best way to set the incoming value but 
for now this will work.
+                 theDefaultHTMLElement.setValue(value);
+             }
+             else {
+                 //this may not be the best way to set the incoming value but 
for now this will work.
+                 theDefaultHTMLElement.setValue(value);                
+             }
+         }
+     }
      
      public void clickLink(String anID) {



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to