получение-java-io-ioexception-when-running-junit-test-case-in-eclipse (продолжение) - PullRequest
0 голосов
/ 24 января 2012

Я только что нашел прокси где-то и применил к моему коду, похоже, успешно.Но когда дело доходит до отправки ("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)... 

1 Ответ

0 голосов
/ 03 апреля 2012

Отправить от 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.
...