<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- Copyright 2004 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- FIXME:DAZ Revert to 405 - these test must fail in order to verify that our "expectError" commands actually check the error value. This should be made clearer in the test name and index.html --> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>Test Click</title> </head> <body> <table cellpadding="1" cellspacing="1" border="1"> <p><em>This test should fail!</em></p> <p>The following test script checks that when verifyFailureOnNext and verifyErrorOnNext are used, the following command should fail and the verified error message must match the actual message.</p> <p>If this functionality is working correctly, each of the following verifyText commands should fail because the verifyFailure/Error doesn't match.</p> <tbody> <tr> <td rowspan="1" colspan="3">Tests for expectError and expectFailure commands<br> </td> </tr> <tr> <td>open</td> <td>../tests/html/test_click_page1.html</td> <td> </td> </tr> <!-- These tests should all fail, as they are checking the error checking commands. --> <tr> <td>verifyFailureOnNext</td> <td>The next command actually succeeds so this verify is wrong</td> <td></td> </tr> <tr id="failure1"> <td>verifyText</td> <td>link</td> <td>Click here for next page</td> </tr> <tr> <td>verifyErrorOnNext</td> <td>The next command is an action that succeeds (instead of an accessor)</td> <td></td> </tr> <tr id="failure2"> <td>echo</td> <td>foo</td> <td></td> </tr> <tr> <td>verifyFailureOnNext</td> <td>The next command does fail, but this is the wrong message</td> <td></td> </tr> <tr id="failure3"> <td>verifyText</td> <td>link</td> <td>foo</td> </tr> <tr> <td>verifyErrorOnNext</td> <td>The next command actually succeeds so this verify is wrong</td> <td></td> </tr> <tr id="failure4"> <td>verifyText</td> <td>link</td> <td>Click here for next page</td> </tr> <tr> <td>verifyErrorOnNext</td> <td>The next command has a failure, not an error</td> <td></td> </tr> <tr id="failure5"> <td>verifyText</td> <td>link</td> <td>foo</td> </tr> </tbody> </table> This next command must come last, because it causes a real error. <table> <tbody> <tr> <td>verifyErrorOnNext</td> <td>The next command does error, but this is the wrong message</td> <td></td> </tr> <tr id="failure6"> <td>verifyText</td> <td>notAlink</td> <td>foo</td> </tr> </tbody> </table> </body> </html>