When I run the test, I got the following ScriptException, I found from the HTTPUNIT Release page that HTTPUNIT supports html style
object, then why it doesn't work here, does anybody knows??
com.meterware.httpunit.ScriptException: Event 'javascript:alert;handleExtension(this, parseInt(this.style.width) + 10);' failed: TypeError: "style" is not defined. (httpunit; line 85)
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.handleScriptException(JavaScript.java:192)
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.performEvent(JavaScript.java:165)
at com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(ScriptableDelegate.java:55)
at com.meterware.httpunit.FormControl.sendOnChangeEvent(FormControl.java:242)
at com.meterware.httpunit.SelectionFormControl.claimUniqueValue(FormControl.java:973)
at com.meterware.httpunit.FormParameter.setValues(FormParameter.java:90)
at com.meterware.httpunit.WebForm.setParameter(WebForm.java:533)
at com.meterware.httpunit.WebForm.setParameter(WebForm.java:526)
at test.nci.webtest.telco.SubscriberAutoAttendantTest.addAutoAttendant(SubscriberAutoAttendantTest.java:199)
at test.nci.webtest.telco.SubscriberAutoAttendantTest.testAddCompanySpeedDialsAllFields(SubscriberAutoAttendantTest.java:217)
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 junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
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)
Kitty
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
When I run the test, I got the following ScriptException, I found from the HTTPUNIT Release page that HTTPUNIT supports html style
object, then why it doesn't work here, does anybody knows??
com.meterware.httpunit.ScriptException: Event 'javascript:alert;handleExtension(this, parseInt(this.style.width) + 10);' failed: TypeError: "style" is not defined. (httpunit; line 85)
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.handleScriptException(JavaScript.java:192)
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.performEvent(JavaScript.java:165)
at com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(ScriptableDelegate.java:55)
at com.meterware.httpunit.FormControl.sendOnChangeEvent(FormControl.java:242)
at com.meterware.httpunit.SelectionFormControl.claimUniqueValue(FormControl.java:973)
at com.meterware.httpunit.FormParameter.setValues(FormParameter.java:90)
at com.meterware.httpunit.WebForm.setParameter(WebForm.java:533)
at com.meterware.httpunit.WebForm.setParameter(WebForm.java:526)
at test.nci.webtest.telco.SubscriberAutoAttendantTest.addAutoAttendant(SubscriberAutoAttendantTest.java:199)
at test.nci.webtest.telco.SubscriberAutoAttendantTest.testAddCompanySpeedDialsAllFields(SubscriberAutoAttendantTest.java:217)
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 junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
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)
Kitty