getting-java-io-ioexception-when-running-junit-test-case-in-eclipse (continued)

喜你入骨 提交于 2019-12-12 04:43:37

问题


I've just found a proxy somewhere and applied to my code, seem to be successful. But when it comes down to submit("btnG"), I got an syntax error SyntaxError:

syntax error (httpunit; line 155)
at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597)
at org.mozilla.javascript.TokenStream.reportSyntaxError(TokenStream.java:1324)... 

回答1:


Submit from net.sourceforge.jwebunit.junit.WebTestCase is deprecated, so if this is what you are trying to use then you will have some issues

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.


来源:https://stackoverflow.com/questions/8982551/getting-java-io-ioexception-when-running-junit-test-case-in-eclipse-continued

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!