<SCRIPT LANGUAGE="JavaScript">
<!-- This function is called when the user clicks the OK button -->
function finalFormSubmital() {
document.forms[0].action = "http://wcdev.stp.guidant.com/Windchill/ext/guidant/velocity/part/equipment/jsp/DoCreateGDTCRMPart.jsp?action=CreatePart";
handleForm();
}
</SCRIPT>
Works in IE but when I use Rhino it am getting:
java.lang.RuntimeException: No such property: action
at com.meterware.httpunit.scripting.ScriptableDelegate.set(ScriptableDelegate.java:98)
at com.meterware.httpunit.WebForm$Scriptable.set(WebForm.java:610)
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.put(JavaScript.java:265)
at org.mozilla.javascript.ScriptableObject.putProperty(ScriptableObject.java:1476)
at org.mozilla.javascript.ScriptRuntime.setProp(ScriptRuntime.java:842)
at org.mozilla.javascript.gen.c6.call(httpunit:2)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2169)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:58)
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.performEvent(JavaScript.java:162)
at com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(ScriptableDelegate.java:55)
at com.meterware.httpunit.Button.doOnClickEvent(Button.java:85)
at com.meterware.httpunit.Button.click(Button.java:68)
at net.sourceforge.jwebunit.HttpUnitDialog.clickButtonWithLabel(HttpUnitDialog.java:1085)
at net.sourceforge.jwebunit.WebTester.clickButtonWithLabel(WebTester.java:936)
at ext.guidant.velocity.eai.CreateEquipmentPartTest.testEquipmentPart(CreateEquipmentPartTest.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The script in my jsp :
<SCRIPT LANGUAGE="JavaScript">
<!-- This function is called when the user clicks the OK button -->
function finalFormSubmital() {
document.forms[0].action = "http://wcdev.stp.guidant.com/Windchill/ext/guidant/velocity/part/equipment/jsp/DoCreateGDTCRMPart.jsp?action=CreatePart";
handleForm();
}
</SCRIPT>
Works in IE but when I use Rhino it am getting:
java.lang.RuntimeException: No such property: action
at com.meterware.httpunit.scripting.ScriptableDelegate.set(ScriptableDelegate.java:98)
at com.meterware.httpunit.WebForm$Scriptable.set(WebForm.java:610)
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.put(JavaScript.java:265)
at org.mozilla.javascript.ScriptableObject.putProperty(ScriptableObject.java:1476)
at org.mozilla.javascript.ScriptRuntime.setProp(ScriptRuntime.java:842)
at org.mozilla.javascript.gen.c6.call(httpunit:2)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2169)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:58)
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.performEvent(JavaScript.java:162)
at com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(ScriptableDelegate.java:55)
at com.meterware.httpunit.Button.doOnClickEvent(Button.java:85)
at com.meterware.httpunit.Button.click(Button.java:68)
at net.sourceforge.jwebunit.HttpUnitDialog.clickButtonWithLabel(HttpUnitDialog.java:1085)
at net.sourceforge.jwebunit.WebTester.clickButtonWithLabel(WebTester.java:936)
at ext.guidant.velocity.eai.CreateEquipmentPartTest.testEquipmentPart(CreateEquipmentPartTest.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
I've run into this problem just few days ago. Here's a patch against 1.6 distribution that you can use:
http://sourceforge.net/tracker/index.php?func=detail&aid=1159892&group_id=6550&atid=306550
see also my analysis of the problem here
http://sourceforge.net/tracker/index.php?func=detail&aid=1155792&group_id=6550&atid=106550