TestCase, setExpectedJavaScriptAlert
Kak rabotaet setExpectedJavaScriptAlert(String s), setExpectedJavaScriptAlert(String[] s)?
Vot takoi kod:
1 tester.setExpectedJavaScriptAlert("Invalid Email");
2 tester.submit();
3 tester.setTextField("password","12345");
4 tester.setExpectedJavaScriptAlert("Invalid Password");
5 tester.submit();
I na stroke 4 proishodit oshibka
junit.framework.AssertionFailedError: You previously tell that alert with message [Invalid Email]
was expected, but nothing appeared.
Esli ia rabotau setExpectedJavaScriptAlert(String[] s), to proishodit toje samoe
Kak v odnom teste proverit neskolko raznih JavaScript soobschenii?
Пока на собственное сообщение не было ответов, его можно удалить.