Update of
/cvsroot/jwebunit//jWebUnit/src/net/sourceforge/jwebunit/plugin/jacobie
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1017/src/net/sourceforge/jwebunit/plugin/jacobie
Modified Files:
JacobieDialog.java
Log Message:
adding support for clickButtonWithText Patch: 1064807
Index: JacobieDialog.java
===================================================================
RCS file:
/cvsroot/jwebunit//jWebUnit/src/net/sourceforge/jwebunit/plugin/jacobie/JacobieDialog.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** JacobieDialog.java 22 Jul 2005 01:24:56 -0000 1.8
--- JacobieDialog.java 12 Aug 2005 18:23:17 -0000 1.9
***************
*** 268,271 ****
--- 268,277 ----
}
+ public Input getButtonByValue(String aButtonValue) {
+ Input theInput = getForm().findButtonByValue(aButtonValue);
+ return theInput;
+ }
+
+
public String getSubmitButtonValue(String aButtonName) {
String theButtonValue = null;
***************
*** 295,308 ****
return bReturn;
}
public void clickButton(String buttonId) {
! throw new UnsupportedOperationException("clickButton");
}
public void clickButtonWithText(String buttonValueText) {
! throw new UnsupportedOperationException("clickButtonWithText");
}
-
-
/**
--- 301,323 ----
return bReturn;
}
+
+ public boolean hasButtonByValue(String aButtonValue) {
+ boolean bReturn = getButtonByValue(aButtonValue) != null ? true
: false;
+ return bReturn;
+ }
+
+
public void clickButton(String buttonId) {
! if(hasButton(buttonId)) {
! getSubmitButton(buttonId).click();
! }
}
public void clickButtonWithText(String buttonValueText) {
! if(hasButtonByValue(buttonValueText)) {
! getButtonByValue(buttonValueText).click();
! }
}
/**
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development