Update of /cvsroot/jwebunit/jWebUnit/src/net/sourceforge/jwebunit/plugin/jacobie
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15843/src/net/sourceforge/jwebunit/plugin/jacobie
Modified Files:
JacobieDialog.java
Log Message:
delegating more methods to jacobie api.
Index: JacobieDialog.java
===================================================================
RCS file:
/cvsroot/jwebunit/jWebUnit/src/net/sourceforge/jwebunit/plugin/jacobie/JacobieDialog.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** JacobieDialog.java 5 Mar 2005 05:46:01 -0000 1.2
--- JacobieDialog.java 5 Mar 2005 17:54:19 -0000 1.3
***************
*** 6,10 ****
import java.util.ListIterator;
- import java.util.Vector;
import net.sf.jacobie.exception.JacobieException;
--- 6,9 ----
***************
*** 110,114 ****
*/
public void reset() {
- super.reset();
resetIE();
}
--- 109,112 ----
***************
*** 242,263 ****
public Input getSubmitButton(String aButtonName) {
! Input theInput = null;
!
! Vector theVector = getForm().findInputTypeSubmits();
! ListIterator theListIterator = theVector.listIterator();
! while (theListIterator.hasNext()) {
! Input theNextInput = (Input) theListIterator.next();
! if(theNextInput.getName().equals(aButtonName)) {
! theInput = theNextInput;
! break;
! }
! }
return theInput;
}
! // public String getSubmitButtonValue(String buttonName) {
! // throw new UnsupportedOperationException("getSubmitButtonValue");
! // }
public boolean hasSubmitButton(String aButtonName) {
boolean bReturn = getSubmitButton(aButtonName) != null ? true : false;
--- 240,273 ----
public Input getSubmitButton(String aButtonName) {
! Input theInput = getForm().findSubmitButton(aButtonName);
return theInput;
}
! public Input getButton(String aButtonID) {
! Input theInput = getForm().findButton(aButtonID);
! return theInput;
! }
+
+ public String getSubmitButtonValue(String aButtonName) {
+ String theButtonValue = null;
+ Input theInput = getForm().findSubmitButton(aButtonName);
+ if(theInput != null) {
+ theButtonValue = theInput.getValue();
+ }
+ return theButtonValue;
+ }
+
+ public boolean hasSubmitButton(String aButtonName, String aButtonValue) {
+ boolean bReturn = false;
+ Input theInput = getSubmitButton(aButtonName);
+ if(theInput != null && theInput.getValue().equals(aButtonValue)) {
+ bReturn = true;
+ }
+ return bReturn;
+ }
+
+
+
public boolean hasSubmitButton(String aButtonName) {
boolean bReturn = getSubmitButton(aButtonName) != null ? true : false;
***************
*** 265,275 ****
}
! // public Button getButton(String buttonId) {
! // throw new UnsupportedOperationException("getButton");
! // }
!
! // public boolean hasButton(String buttonId) {
! // throw new UnsupportedOperationException("hasButton");
! // }
/**
--- 275,282 ----
}
! public boolean hasButton(String aButtonID) {
! boolean bReturn = getSubmitButton(aButtonID) != null ? true : false;
! return bReturn;
! }
/**
-------------------------------------------------------
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