标题: 使用JWebUnit测试一个用于登陆的jsp页面,出现了一个像是httpunit的异常 [打印本页] 作者: fan 时间: 2005-5-11 09:35 标题: 使用JWebUnit测试一个用于登陆的jsp页面,出现了一个像是httpunit的异常 使用JWebUnit1.2,应用是基于struts的。
错误堆栈是:
ReferenceError: "submit" is not defined.
at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597)
at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:557)
at org.mozilla.javascript.ScriptRuntime.getBase(ScriptRuntime.java:1110)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2006)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:5
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.WebRequestSource.submitRequest
(WebRequestSource.java:224)
at com.meterware.httpunit.WebLink.click(WebLink.java:90)
at net.sourceforge.jwebunit.HttpUnitDialog.submitRequest(HttpUnitDialog.java:573)
at net.sourceforge.jwebunit.HttpUnitDialog.clickLinkWithText(HttpUnitDialog.java:655)
at net.sourceforge.jwebunit.WebTester.clickLinkWithText(WebTester.java:885)
at net.sourceforge.jwebunit.WebTestCase.clickLinkWithText(WebTestCase.java:359)
at com.fifa.test.jwebunit.CopyOfLoginPageTest.loginAs(CopyOfLoginPageTest.java:73)
......