[Httpunit-commit] CVS: httpunit/src/com/meterware/httpunit/javascript JavaScript.java,1.45,1.46
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2003-02-17 23:55:16
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv28955/src/com/meterware/httpunit/javascript
Modified Files:
JavaScript.java
Log Message:
#680695: Support form control ids and Button.click()
Index: JavaScript.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/javascript/JavaScript.java,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- JavaScript.java 5 Feb 2003 16:07:39 -0000 1.45
+++ JavaScript.java 17 Feb 2003 23:54:42 -0000 1.46
@@ -179,9 +179,9 @@
private void handleScriptException( Exception e, String badScript ) {
final String errorMessage = badScript + " failed: " + e;
if (!(e instanceof EcmaError) && !(e instanceof EvaluatorException)) {
- e.printStackTrace();
throw new RuntimeException( errorMessage );
} else if (isThrowExceptionsOnError()) {
+ e.printStackTrace();
throw new ScriptException( errorMessage );
} else {
_errorMessages.add( errorMessage );
@@ -941,7 +941,18 @@
public void jsFunction_focus() {}
+
public void jsFunction_select() {}
+
+
+ public void jsFunction_click() throws IOException, SAXException {
+ getDelegate().click();
+ }
+
+
+ private Input getDelegate() {
+ return (Input) _scriptable;
+ }
void initialize( JavaScriptEngine parent, ScriptableDelegate scriptable )
|