Hello!
I have to test a website where a JavaScript alert should tell me, that I 
have forgotten to set a correct article count.

The check works perfectly for the first time. The first test is checking 
the page when I enter 0 (i.e. "0"), the second one should be when I set 
the value to nothing (i.e. "").

But I get a failure: "You previously tell that alert with message [....] 
was expected, but nothing appeared."

I set the same string to the first argument on 
setExpectedJavaScriptAlert(), and getPageSource() shows me, that in the 
onload attribute of the body tag the function to call is send.

Does setExpectedJavaScriptAlert() remember itself, when the same Alert 
appears again?

Best Regards
Christian

--------------
- Sourcecode -
--------------

The test:

...
setTextField("count", "0");
submit("actionUpdateGeraet");

// Step 18 - Close Alert
setExpectedJavaScriptAlert("Enter correct count");
// ^^^ Works here

// Step 19 - Add 1. Item
...
setTextField("count", "4");
submit("actionUpdateGeraet");

// Step 21 - Add 2. Item
...
setTextField("count", "");
submit("actionUpdateGeraet");

// Step 22 - Close Alert
setExpectedJavaScriptAlert("Enter correct count");
// ^^^ Doesn't work here

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to