【问题标题】:getting-java-io-ioexception-when-running-junit-test-case-in-eclipse (continued)获取 java-io-ioexception-when-running-junit-test-case-in-eclipse (续)
【发布时间】:2012-01-24 05:49:13
【问题描述】:
我刚刚在某处找到了一个代理并应用于我的代码,似乎成功了。但是当它归结为 submit("btnG") 时,我得到了一个语法错误 SyntaxError:
syntax error (httpunit; line 155)
at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597)
at org.mozilla.javascript.TokenStream.reportSyntaxError(TokenStream.java:1324)...
【问题讨论】:
标签:
junit
ioexception
testcase
jwebunit
【解决方案1】:
从net.sourceforge.jwebunit.junit.WebTestCase 提交已被弃用,所以如果这是您尝试使用的内容,那么您将遇到一些问题
public void submit()
Deprecated.
Submit form - default submit button will be used (unnamed submit button, or named button if there is only one on the form.
submit
public void submit(String buttonName)
Deprecated.
Submit form by pressing named button.
Parameters:
buttonName - Submit button name attribut value.
submit
public void submit(String buttonName, String buttonValue)
Deprecated.
Submit the form by pressing the named button with the given value (label). Useful if you have more than one submit button with same name.
Parameters:
buttonName - Submit button name attribut value.
buttonValue - Submit button value attribut value.